* Clean up FAR and RenameLocations
This change had two goals:
1. Make the code easier to understand, primarily by simplifying the callback structure and minimizing side-effects
2. Improve performance by reducing repeated work, both FAR searches of individual projects and default tsconfig searches
This implementation attempts to preserve the merging order found in the original code (someone less relevant in the present state of using syntactic isDefinition).
* Stop enforcing search and aggregation order
...in preparation for implementing isDefinition explicitly.
Also restore convention of referring to `DocumentPosition`s as "locations".
* Introduce LanguageService.updateIsDefinitionOfReferencedSymbols
...to allow use of the checker when computing isDefinition across projects.
* Update baselines
* Tidy diff
* De-dup simplified results
* Baseline cross-project isDefinition results
* Move de-duping upstream to fix Full output
* Add server baseline test to confirm searches are not repeated
* Manually merge #48758
* Update baseline for newer fix to #48963
* Remove bigint from Object.freeze in es5.d.ts
`BigInt` isn't resolved whenever `lib < es2020`, but it's not an error
when `target < es2020`. I have a few ideas for improving this situation
but for the RC I'm going to remove `bigint` from Object.freeze's
signature.
* Update other baselines
* No errors for missing apparent type of bigint,symbol for any target
* Update test text
* feat: support error when comparing with object/array literals
* chore: include regexp, function and class literal
* chore: include regexp, function and class literal
* test: update baseline
* fix: baseline
- this currently causes a bug on Windows with mixed path separators
- it returns a POSIX backslash path for __dirname, and then adds a
forward slash from the directorySeparator, causing mixed separators
- TS uses `/` internally and lets the host convert if needed, so
I assume this should be normalized to all forward slashses instead
- example of the bug from my tests:
```
Expected: "D:\\a\\rollup-plugin-typescript2\\rollup-plugin-typescript2\\node_modules\\typescript\\lib\\lib.d.ts"
Received: "D:\\a\\rollup-plugin-typescript2\\rollup-plugin-typescript2\\node_modules\\typescript\\lib/lib.d.ts"
```
- every other use of __dirname in the codebase seems to be normalized
except for this one
- could use normalizeSlashes for this, but I figure combinePaths is
more appropriate since that will handle it and combine properly as
well without any `+ directorySeparator +` stuff
* Allow referencing type-only exports as namespace members in ImportTypes and TypeQueries
* Add extra test case
* ;; -> ;
* undefined -> false
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
This commit updates the type of `RelativeTimeFormatPart` to clarify that
the `unit` prop is always singular, unlike the plural or singular values
that are accepted as inputs.
This also changes `RelativeTimeFormatPart` to be a discriminated
union type because the `unit` prop is only present if the `type` prop's
value is not "literal".
Fixes#46245
* Add a failing test case for contextual type not provided for functions comming from a property with intersection type
* Fixed an issue with contextual type for intersection properties
* Fixed how type of a property of a contextual type is being computed when intersections with indexers are used
* Add JSDoc's @inheritDoc Support for Static Class Members for TypeScript
* use public api
* fix
* add tests
* simplify implementation
* extract comments from inherticDoc