* fix(47562): Add option to suppress type hint if variable name matches type
* Remove the unnecessary debug code
* Re-run gulp runtests
* Use equateStringsCaseInsensitive to compare strings
* Add es2018.intl ref to es2020.intl
es2020.intl refers to NumberFormatPartTypes declared in es2018.intl
as of #46508.
I'm not sure how to test this; it repros on Definitely Typed in
types/ndarray, but when I copy the same files into a compiler test it
passes without a problem.
* Add a test that shows the change works
It doesn't actually show that the original bug has been fixed,
though.
* Fix path completions for typesVersions
* Add more tests
* Fix case when * is a fragment of a path component
* Once a path pattern matches, only return completions from that pattern and higher priority ones
* Fix iteration order issue
* Aesthetics
* 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
* 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>
* 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
* Allow export map entries to remap back to input files for a program
* Fix file casing issues on windows
* Implement abiguity error, doesnt quite work
* Refine selection logic in error case to use getCommonSourceDirectory, add more tests
* Skip ambient modules in globalThis
Previously, globalThis mistakenly included ambient modules, even though
these are not values:
```ts
declare module "ambientModule" {
export type typ = 1
export var val: typ
}
type Oops = (typeof globalThis)[\"ambientModule\"]
```
This PR adds ambient modules to the kinds of things that are skipped
when constructing `globalThis`' properties, along with block-scoped
variables.
* Skip only modules with every declaration ambient
The modules are required to have at least one declaration so that our
treatment of `globalThis` stays the same, and
`globalThis.globalThis.globalThis` remains legal.
* Remove Node12, add Node16.
* Accepted baselines.
* Refactor checking for top-level await, give a better error message in CJS files.
* Accepted baselines.
* Stop erroring on JSON module imports in node ESM since they're no longer experimental.
* Accepted baselines.
* More refactoring, do the same checks for for-await loops.
* Accepted baselines.
* Adjust phrasing to permit for-await on CJS error.
* Accepted baselines.
* Accepted baselines.
* Fix lints.
* WIP
* fix cross-project renaming logic
* only use configure if prefix opt is defined
* refactor skipAlias into stopAtAlias
* fix stopAtAlias
* update another stopAtAlias location
processChildNodes needs to skip processing when the node array is
outside the target range, just like processChildNode already does for a
single node.
Fixes#48006
* Added unit test
* Added baseline test
* Dirty solution
* Code refactoring and improvements
* Added more test cases
* Refactor to use flatMap
* Added utility function to get all Nodes with JSDocs
* Minor improvements
* Use recursion to check all tree levels
* Removed unit test
* Removed previous changes
* Updated resolveEntityName call
* Updated dontResolveAlias clause
* Updated symbol flags
* Updated baseline
* Fix dont resolve alias problem
* Updated tests
* Add failing test
* Block auto-import module specifiers including node_modules path
* Eagerly resolve module specifiers in completions in nodenext so failures can be filtered
* Add completion info flags for telemetry
* Update API baseline
* Update completions baselines
* Fix missed boolean flip
* Fix remaining tests
* change error message on Promise
* fix(46570): Unhelpful Promise type argument hint in JS file
* refactor: Reword void Promise message for JSDoc type hint to provide better feedback
Co-authored-by: Osa <osaimola@gmail.com>