Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit fb2f4cf

Browse files
authored
Add new externs translation for w3c_navigation_timing. (#915)
* Add new externs translation for w3c_navigation_timing. * Change golden test output to match JSCompiler change. Recently, /** */ syntax that does not contain @const, @type, etc, directives is no longer considered JsDoc by the compiler and clutz will no longer emit it. Since most closure code does have some type anotation I don't think this will have much effect on clutz.
1 parent 35a0e49 commit fb2f4cf

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/test/java/com/google/javascript/clutz/testdata/base.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ declare namespace goog {
2323
function inherits (childCtor : Function , parentCtor : Function ) : void ;
2424
function isDef (val : any ) : boolean ;
2525
function require (name : string ) : ಠ_ಠ.clutz.ClosureSymbolNotGoogProvided;
26-
let /**
27-
* Reference to the global context. In most cases this will be 'window'.
28-
*/
29-
global : any ;
26+
let global : any ;
3027
}
3128
// Generated from src/test/java/com/google/javascript/clutz/testdata/base.js
3229
declare namespace ಠ_ಠ.clutz.goog {

src/test/java/com/google/javascript/clutz/testdata/general_with_platform.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,18 @@ declare namespace ಠ_ಠ.clutz {
626626
writeText (text : string ) : Promise < undefined > ;
627627
}
628628
}
629+
// Generated from externs.zip//w3c_navigation_timing.js
630+
declare namespace ಠ_ಠ.clutz {
631+
/**
632+
* https://wicg.github.io/layout-instability/#sec-layout-shift
633+
*/
634+
class LayoutShift extends PerformanceEntry {
635+
private noStructuralTyping_LayoutShift : any;
636+
hadRecentInput : boolean ;
637+
lastInputTime : number ;
638+
value : number ;
639+
}
640+
}
629641
// Generated from externs.zip//w3c_rtc.js
630642
declare namespace ಠ_ಠ.clutz {
631643
class BlobEvent extends GlobalEvent {

src/test/java/com/google/javascript/clutz/testdata/outputBase/function_alias_output_base.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ declare namespace goog {
2323
function inherits (childCtor : ಠ_ಠ.clutz.partial.FunctionAlias , parentCtor : ಠ_ಠ.clutz.partial.FunctionAlias ) : void ;
2424
function isDef (val : any ) : boolean ;
2525
function require (name : string ) : ಠ_ಠ.clutz.ClosureSymbolNotGoogProvided;
26-
let /**
27-
* Reference to the global context. In most cases this will be 'window'.
28-
*/
29-
global : any ;
26+
let global : any ;
3027
}
3128
// Generated from src/test/java/com/google/javascript/clutz/testdata/base.js
3229
declare namespace ಠ_ಠ.clutz.goog {

src/test/java/com/google/javascript/clutz/testdata/partial/abstract_method_partial.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ declare namespace ಠ_ಠ.clutz {
66
* It appears that this one is emitted correctly without partial_goog_base.js
77
*/
88
methodWithTypes ( ) : number ;
9-
/**
10-
* But this one needs partial_goog_base.js
11-
*/
129
methodWithoutTypes ( ...a : any [] ) : any ;
1310
}
1411
}

src/test/java/com/google/javascript/clutz/testdata/prototype_inferred_type.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
declare namespace ಠ_ಠ.clutz.foo {
33
class Klass {
44
private noStructuralTyping_foo_Klass : any;
5-
/**
6-
* Crazy pattern, I have only seen it used by jquery.fn = jquery.prototype
7-
*/
85
static foo : any ;
96
}
107
}

0 commit comments

Comments
 (0)