d495957065
Add missing parts in the binder and the checker to enable CFA + narrowing of `import.meta` values. Fixes #41468
15 lines
239 B
TypeScript
15 lines
239 B
TypeScript
//// [importMetaNarrowing.ts]
|
|
declare global { interface ImportMeta {foo?: () => void} };
|
|
|
|
if (import.meta.foo) {
|
|
import.meta.foo();
|
|
}
|
|
|
|
|
|
//// [importMetaNarrowing.js]
|
|
;
|
|
if (import.meta.foo) {
|
|
import.meta.foo();
|
|
}
|
|
export {};
|