Previously, the error span was too large on @type errors on functions
when the type was not a function. The span covered the entire tag. This
PR changes the error node just to be the type of the type tag. In other words,
the error span was previously this:
```
@type {IncorrectType}
```
But is now just this:
```
IncorrectType
```
Fixes the first error from #41974, but not the other two.
Co-authored-by: Ashya Manning <ashyamanning@pursuit.org>
Co-authored-by: Nilber Remon <nilberremon@gmail.com>
Co-authored-by: Ashya Manning <ashyamanning@pursuit.org>
Co-authored-by: Nilber Remon <nilberremon@gmail.com>
* fix: #41259
* fix: #41259
* fix: fourslash
* fix: remove nested if
* fix: change tc result for #41259
* fix: less restrictive shorthand completion rules
* fix: use typeMembers to find out whether properties are empty
* fix: typo
* fix: lint
* fix: exclude Object in completion
* fix: test
* fix: testcase tidy up
* fix: apply completions for unclosed literal and missing comma
* fix: ignore auto-imports
* fix: use exact to ensure the order of completions
* fix: use exact to ensure the order of completions
* fix: add new lines so it can easy to be distinguished
Co-authored-by: Johanne Enama <jenama@users.noreply.github.com>
Co-authored-by: Kevin Wong <kwong0419@users.noreply.github.com>
Co-authored-by: Johanne Enama <jenama@users.noreply.github.com>
Co-authored-by: Kevin Wong <kwong0419@users.noreply.github.com>
* Test that forceConsistentCasingInFileNames does not apply to Windows drive roots
* Add file symlink baselines
* Add directory symlink baselines
* Update test to retain its meaning
Its purpose is (apparently) to demonstrate that
forceConsistenCasingInFileNames can interact badly with synthesized
react imports. Since the casing of the synthesized import has changed,
also modify the casing of the explicit reference to still conflict.
* Make VFSWithWatch.realpath use the path on disk
* Update VFS realpathSync to behave like realpathSync.native
* Use fs.realpathSync.native when available
In local measurements of an Office project, we saw initial project
loading get 5% faster on Windows and 13% faster on Linux. The only
identified behavioral change is that it restores the case used on disk,
whereas realpathSync retains the input lowercase.
* Rename SortedMap.getKeyAndValue to getEntry
* fix as suggestion.
* Update moduleSpecifiers.ts
* compare symbol rather than string
* fix typo.
* fix
* fix lint.
* better name and more clear code
* fix comment.
Co-authored-by: Orta Therox <git@orta.io>
* Have signature identity checks look at the base constraint of type parameters, allow identical type parameter lists to merge in union signatures
* Update text in fourslash test
* Add whitespace to fix lint, remove duplicate impl
* Consolidate names
* Remove comparisons of type parameter defaults, add more test cases
* Explore at least 10 levels of constraints before checking for deeply nested types
* Simplify constraint depth limiter logic
* Add regression test
* Accept new baselines
* Add text-based fastpaths into LS token matching
* Update src/services/utilities.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update src/services/utilities.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update src/services/utilities.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Limit search a bit
* Secretly, this was allowed to be `undefined` and was in fact used as such
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>