TypeScript/tests/baselines/reference/misspelledNewMetaProperty.symbols
David Sherret 03dff41c9f
Fix getting completion details for meta properties (#45031)
* 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
2021-08-04 09:41:04 -07:00

7 lines
279 B
Plaintext

=== tests/cases/compiler/misspelledNewMetaProperty.ts ===
function foo(){new.targ}
>foo : Symbol(foo, Decl(misspelledNewMetaProperty.ts, 0, 0))
>new.targ : Symbol(foo, Decl(misspelledNewMetaProperty.ts, 0, 0))
>targ : Symbol(foo, Decl(misspelledNewMetaProperty.ts, 0, 0))