Component commits:
c9846f8b83 Restore HTMLDocument constructable value in DOM
Don't touch anything else in the DOM.
Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
Component commits:
01077c1299 fix(45417): show inlay hints for null and literal-like identifiers
Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
Component commits:
f7af8f4a4a fix(45393): show parameter name hints for unary literal expressions
Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
Component commits:
58a924d968 fix(45345): throw an error on overridden member that is defined in multiple interfaces
Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
Component commits:
61dd78f65d Use getFileAndProject in session provideInlayHints to ensure language service updates are applied
Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
When a class declaration lacks a name, don't throw an exception when
producing the display parts (e.g. for QuickInfo).
Remaining issues:
1. The name shows as "__missing", the name of the underlying symbol,
rather than "(Missing)", as it is for the corresponding function
declaration case (because the parse constructs a missing identifier
node for the function declaration).
2. "(Missing)" is hard-coded, rather than being a localizable resource
string.
3. When an anonymous class declaration is a default export, the
corresponding symbol is named "default", resulting in the confusing
display string "class default".
Since display parts are built using existing `symbolToString`
functionality, it wasn't clear whether detecting special symbol names
and replacing them with user-friendly strings could be done without
breaking other functionality.
Similarly, changing the shape of the parse tree seemed riskier than the
problem justified (the user experience is just not getting QuickInfo for
the incomplete declaration, which seems acceptable).
* Fix check in hasNonBindingPatternContextualTypeWithNoGenericTypes
* Add regression tests
* Accept new baselines
* Compute both ObjectFlags.IsGenericXXXType flags in one go
* WIP on refining the new --help
* Fix types in the boolean trivial lint rule
* Update baselines
* More work
* Updates the color logic
* Simplifies the CLI color code
* Use cyan instead of blue for win powershell/command prompt
* Use bright white when blue is probably going to look off
* Fix NO_COLOR
* Adds a test to cover NO_COLOR
* Update src/compiler/diagnosticMessages.json
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update compiler diagnostic text
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
1. `getRawLiteral()`: barf if `currentSourceFile` is missing, since if
it is, then the following `getSourceTextOfNodeFromSourceFile` will
return a bogus `""`.
2. One `||` -> `??` change.
3. `backtickQuoteEscapedCharsRegExp`: escape the usual control
characters except for a simple LF. This code does get used to
generate backtick strings when `rawText` is not given, and not
escaping things like TAB characters can get mangled by editor
settings. Worse, not escaping a CRLF and putting it verbatim in sthe
string source will interpret it as LF, so add a special case for
escaping these as `\r\n`.
Added test.
Related to #44313 and #40625.
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>