Component commits:
d1920805b0 Do not incorrectly add line separators for non-synthetic nodes when emitting node list
As of 3c32f6e154, a line separator is
added between nodes if the nodes are not synthetic and on separate
lines. This it push s wrong and previously only happened if the non-synthetic
nodes were on different lines but had the same parent.
Fixes#44068.
Co-authored-by: Paul Gschwendtner <paulgschwendtner@gmail.com>
Component commits:
b6754e401b Add test showing how setting strict is not preserved in tsbuildinfo Test for #44305d3b479e5ba Handle strict flag when writing tsbuildinfo Fixes#44305cee9f40fd9 Apply suggestions from code review
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Component commits:
7a9854c4a4 Ensure static index signatures have an errorNode available
626b4319cb Merge branch 'master' into error-node-static-index-signatures
a8327a0396 Lookup static index signature declarations in the right symbol table, stop checking prototype props
Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
Component commits:
acdaf368c6 Move class name capture for private state until after declaration evaluates
Co-authored-by: Ron Buckton <rbuckton@microsoft.com>
Component commits:
34b80a51af Don’t offer import statement completions at `from` position
afa4d051a9 Set isGlobalCompletion to false, use indexOf lookup
Co-authored-by: Andrew Branch <andrew@wheream.io>
* Switches from never allowing semantic highlight on JS to only doing it if we have a valid source file
* Adds a way to test and validate that an arbitrary JS file gets semantic classification results
* Revert to just dropping the if statement
* Test showing the moduleResolutionCache reset issue with tsc --b --w
* Fix incorrect usage of ownMap by making it function returning ownMap instead of constant value
* Improve errors for incorrectly nested export default
The compiler and services don't handle incorrectly nested
`export default` well right now:
```ts
export = (x,y) => {
export default { }
}
```
Asking for document highlights, find all references or quick info on
'export' or 'default' cause a crash. After the crash is fixed, the error
message is confusing and wrong: "An export assignment cannot be used outside a module."
This PR:
1. Skips document highlights for incorrectly nested export default.
2. Skips find all refs for incorrectly nested export default.
3. Switches the fallback binding for incorrectly nested export default
from Alias to Property. Neither is correct, but Property doesn't cause a
crash in alias resolution.
4. Improves the error message to reflect a post-ES module world, which
has export default and 'module' means 'ES module', not 'namespace'.
Fixes#40082 and the related bugs mentioned above.
* address PR comments
PR #42556 was a nice optimization that dramatically sped up comparisons of discriminated unions. Unfortunately, the cost of determining whether a union is discriminated can be prohibitively high. In particular, an internal team with a very large repo saw their type count double and their memory usage increase from 6GB to 9GB, breaking their build. This changes splits the difference by not trying to compute the property types of intersection types - a notoriously slow operation.
* Fix package.json auto imports for pnpm without project references
* Make property optional
* Revert unnecessary unnittest change
* Set symlinked files when setting symlinked directories
* Update `typeDirectiveIsEqualTo`
* Consider symlinks found during type reference directive resolution into `discoverProbableSymlinks`
* Rename `originalFileName` to `originalPath`, make internal
* Allow filterType to consider union constraints of non-union types when determining never-ness
* Move impl to callback
* Baseline change in narrowing behavior into test, fix post-LKG build
* Test where allowJs present in referenced project affects picking up right set of import files
* use options from referened project for including resolved imports in the file when using sources of project reference
Fixes#43909
Previously, the name resolution for link tags in displaypart generation
mistakenly required a valueDeclaration. Now it uses the first
declaration if there is no valueDeclaration, so that types and
namespaces will also resolve.
This is another instance of using valueDeclaration as "the default
declaration", which doesn't apply to types.
Fixes#43868
* Test where relative import isnt ideal in the declaration emit
* use project relative preference for declaration emit
Fixes#39117
* Fix incorrect path matching when calculating module specifier
* Use correct baseUrl for the module specifier
* Handle localness in special cases by checking exported variable assignment
Fixes#42976
* Fix existing tests where arrow now behaves similar to function expression
* Update src/services/goToDefinition.ts
Previously, getExternalModuleMember passed through its received value of
`dontResolveAlias` to every function that accepted it. That includes (1)
resolution of the module symbol and (2) resolution of the module
specifier. However, in TS, the module symbol is never an alias anyway, so
dontResolveAlias doesn't make a difference. In JS, the module symbol
*can* be an alias, and it should always be resolved. That's what this PR
does.
Fixes#43713
* Scribbles + tests
The second test actually requires node types
* Basically working
The two simple fixes, in arity error reporting, are in, and the
simplification of arity error reporting is half-done. I haven't started
on any improvements to call assignability.
* trim out too-real test case
* Finish cleanup
And reword error a little.
* Simplify and reword spread errors
* handle spreads first
* update baselines
* Address PR comments