* 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
29 lines
1.3 KiB
Plaintext
29 lines
1.3 KiB
Plaintext
=== tests/cases/conformance/es6/newTarget/newTargetNarrowing.ts ===
|
|
function foo(x: true) { }
|
|
>foo : Symbol(foo, Decl(newTargetNarrowing.ts, 0, 0))
|
|
>x : Symbol(x, Decl(newTargetNarrowing.ts, 0, 13))
|
|
|
|
function f() {
|
|
>f : Symbol(f, Decl(newTargetNarrowing.ts, 0, 25), Decl(newTargetNarrowing.ts, 6, 1))
|
|
|
|
if (new.target.marked === true) {
|
|
>new.target.marked : Symbol(f.marked, Decl(newTargetNarrowing.ts, 6, 1))
|
|
>new.target : Symbol(f, Decl(newTargetNarrowing.ts, 0, 25), Decl(newTargetNarrowing.ts, 6, 1))
|
|
>target : Symbol(f, Decl(newTargetNarrowing.ts, 0, 25), Decl(newTargetNarrowing.ts, 6, 1))
|
|
>marked : Symbol(f.marked, Decl(newTargetNarrowing.ts, 6, 1))
|
|
|
|
foo(new.target.marked);
|
|
>foo : Symbol(foo, Decl(newTargetNarrowing.ts, 0, 0))
|
|
>new.target.marked : Symbol(f.marked, Decl(newTargetNarrowing.ts, 6, 1))
|
|
>new.target : Symbol(f, Decl(newTargetNarrowing.ts, 0, 25), Decl(newTargetNarrowing.ts, 6, 1))
|
|
>target : Symbol(f, Decl(newTargetNarrowing.ts, 0, 25), Decl(newTargetNarrowing.ts, 6, 1))
|
|
>marked : Symbol(f.marked, Decl(newTargetNarrowing.ts, 6, 1))
|
|
}
|
|
}
|
|
|
|
f.marked = true;
|
|
>f.marked : Symbol(f.marked, Decl(newTargetNarrowing.ts, 6, 1))
|
|
>f : Symbol(f, Decl(newTargetNarrowing.ts, 0, 25), Decl(newTargetNarrowing.ts, 6, 1))
|
|
>marked : Symbol(f.marked, Decl(newTargetNarrowing.ts, 6, 1))
|
|
|