Make it backslash-escape backticks too. While I was there, remove the
use of this function for the text (which was the earlier confused
version that used only `text`), and rename it as
`escapeRawStringForTemplate` to clarify.
Added a test to the preivious pile of tests.
Fixes#45278.
* 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
* Visit children of jsdoc type aliases in the binder
This sets up parent pointers.
Fixes#45254 and almost certainly #45248, though I haven't figured out
to repro the second case.
* move incorrect parenthesis
* manually set comment parent instead
* Bind children of typedef where possible
* add explanatory comment to binding
* Do not classify Infinity and NaN. Fixes#42022
* Internally expose so that the classifier can use it
* Increase the test complexity, and revert the type-checker
* Drop the -Infinity
Co-authored-by: Orta <git@orta.io>
* Ensure all `SortText` entries have the same length.
* Update Baselines and/or Applied Lint Fixes
* Update the exact same enum to the exact same values in fourslash. 🙄
* Make `SortTextId` a const enum, switch to use an explicit offset in `SortTextId`.
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
* Add id and version to ManyToManyPathMap
...so that unchanged maps can be recognized without having to examine
their contents.
* Track cache version on BuilderState
In practice, `updateExportedFilesMapFromCache` is called repeatedly
without the cache changing in between. When this occurs, there's no
need to update the `BuilderState` (this was already the net effect, but
it took a long time to determine that no work was required).
* Fix typo in comment
* Fix getChildCount/At methods in EndOfFileTokens
Before, they were hardcoded to return `0` and `undefined!`, respectively, but that is inaccurate for `EndOfFileToken`s with attached jsdoc.
* Add tests for getChild* methods on EndOfFileTokens
* don't track computed name if symbol has no declaration
* add compiler test
* add non serializable property declaration emit error
* don't track computed name if symbol has no declaration
* fix small stuff
* rebase: add non serializable property declaration emit error
* use symbolToString instead of symbolName
Instead of letting `createTemplate*` generate a broken raw string from
the cooked one, grab the source code for it.
Also, add a missing bit to `\`-quote `$`s. As the comment in the code
says, it could just `\`-quote `${` since other `$`s are valid, but I
think that it's less confusing to always quote $s (but the change is in
the comment if minimalism is preferred).
Also, a small-but-confusing bug in `getCookedText()`.
Many tests for all of this.
Fixes#40625