mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
17 lines
319 B
TypeScript
17 lines
319 B
TypeScript
//// [tests/cases/conformance/es2019/importMeta/importMetaNarrowing.ts] ////
|
|
|
|
//// [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 {};
|