03dff41c9f
* Fix getting completion details for meta properties. * Move inside the worker. * Move ImportMeta handling to completions.ts * Fix property type name for new.target. * Use symbols for ImportMeta completions. * Accept baselines. * Revert lib change. * Revert needless parser change. * Missed these reverts. * Remove now unused `isMetaPropertyExpression` * Move up meta property keyword check to be done in `getSymbolAtLocation` and `getTypeOfNode` * Call `checkNewTargetMetaProperty` directly and handle when it's an error type. * Make meta property expression types synthetic. * Make event.target and import.meta properties readonly * Add a test for go to definition (I think?) * Copy built-in types/values test for go to definition. * Add tests for go to definition when not a module. * Fix "go to definition" for new.target
18 lines
999 B
Plaintext
18 lines
999 B
Plaintext
=== tests/cases/conformance/es2019/importMeta/importMetaNarrowing.ts ===
|
|
declare global { interface ImportMeta {foo?: () => void} };
|
|
>global : Symbol(global, Decl(importMetaNarrowing.ts, 0, 0))
|
|
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16))
|
|
>foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39))
|
|
|
|
if (import.meta.foo) {
|
|
>import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39))
|
|
>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16))
|
|
>foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39))
|
|
|
|
import.meta.foo();
|
|
>import.meta.foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39))
|
|
>import.meta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(importMetaNarrowing.ts, 0, 16))
|
|
>foo : Symbol(ImportMeta.foo, Decl(importMetaNarrowing.ts, 0, 39))
|
|
}
|
|
|