-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Fully pass typechecking in #experiments + references cleanup (#37214)
* Set up #experiments for typechecking * Enable partial typechecking on #experiments * Rename *-globals.d.ts files for convention/consistency * Remove extern file * Use reference comment tag where trivial * Partial type-checking for #experiments * Forbidden terms * Lint fixes * Split up some .d.ts files * Revert references tags * Include all core .d.ts files * Fix All The Things! * Lint fixes * Remove unneeded assertions * Merge in and use shared config * Comment out local/no-duplicate-name-typedef * Lint fixes * Un-rename accidental rename * Fix @ const {string} for prop literals * Fix remaining type errors after removing allowance * Remove unneeded annotations on FORM_PROP_
- Loading branch information
Showing
31 changed files
with
154 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export {}; | ||
|
||
declare global { | ||
interface AmpModeObject { | ||
esm: boolean; | ||
} | ||
|
||
interface Window { | ||
// AMP Mode, used to force an override in tests. | ||
__AMP_MODE: AmpModeObject; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export {}; | ||
|
||
declare global { | ||
interface Window { | ||
// Never exists; used as part of post-compilation checks to verify DCE. | ||
__AMP_ASSERTION_CHECK: undefined; | ||
|
||
// Global error reporting handler; only present in AMP pages. | ||
__AMP_REPORT_ERROR?: (this: Window, err: Error, opt_el?: Element) => void; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ export {}; | |
|
||
declare global { | ||
interface Error { | ||
messageArray?: Array<any>; | ||
messageArray?: any[]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"compilerOptions": {"baseUrl": "../.."}, | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": {"baseUrl": "../.."}, | ||
"include": ["**/*.js", "**/*.d.ts"] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export {}; | ||
|
||
declare global { | ||
interface Window { | ||
__AMP_EXPERIMENT_BRANCHES?: import('./types.d').ExperimentBranchMap; | ||
__AMP__EXPERIMENT_TOGGLES?: {[key: string]: boolean}; | ||
__AMP_EXP?: HTMLScriptElement; | ||
AMP_EXP?: {[key: string]: number}; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.