33073 Commits

Author SHA1 Message Date
Wesley Wigham
130e16d73b
Add missing JSXSpreadAttribute case to JSX completion logic (#44514) 2021-06-10 10:01:25 -07:00
Orta Therox
481c2037cc
Re-name really long file (#44413) 2021-06-10 14:18:56 +01:00
Ikko Ashimine
4903c64ad2
Fix typo in open-cherry-pick-pr.ts (#44517)
seperately -> separately
2021-06-09 14:16:08 +01:00
Oleksandr T
147d721136
fix(43298): copy comments on converting from arrow function to anonymous function (#44236) 2021-06-08 15:22:23 -07:00
Oleksandr T
591be7bece
feat(44263): add quick fix for misspelled override error (#44266) 2021-06-08 15:17:56 -07:00
Andrew Branch
703c1bc69d
Include type reference directives in symlink cache, wait until program is present to create it (#44259)
* Fix discovery of more pnpm symlinks

* Add some tests

* Never show pnpm paths in auto imports, even if there’s no other path

* Import statement completions can return none

* Fix tests

* Add failing test showing poor symlink cache reuse

* Fix test, fails for right reasons now

* Preserve cache built up during program creation, then fill in with program resolutions

* Remove obsolete comment

* Remove obsolete type assertion

* Revert fully filtering out ignored paths
2021-06-08 12:06:55 -05:00
TypeScript Bot
bf4642f089 Update package-lock.json 2021-06-08 06:13:21 +00:00
Sheetal Nandi
dab2ffc45a
Add SolutionBuilderHostBase.getCustomTransformers to be used when emitting. (#44489)
This allows not having to specify the transformers during normal watch scneario
Builds on top of #43984
2021-06-07 15:32:39 -07:00
Orta Therox
be2fec1386
Update playground build script (#44456) 2021-06-07 21:39:52 +01:00
TypeScript Bot
faefc72566 Update package-lock.json 2021-06-05 06:26:13 +00:00
Sheetal Nandi
24da242b67
Update the version in baselines (#44447) 2021-06-04 15:08:23 -07:00
Nathan Shively-Sanders
8e1bf08fa9
Fix duplicate visit of param tag comments (#44443)
Fixes #44422
2021-06-04 12:54:36 -07:00
Paul Gschwendtner
b26f77a703
Do not incorrectly add line separators for non-synthetic nodes when emitting node list (#44070)
As of 3c32f6e154ead6749b76ec9c19cbfdd2acad97d6, 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.
2021-06-04 09:46:23 -05:00
TypeScript Bot
a7fb678c03 Update package-lock.json 2021-06-04 06:38:32 +00:00
Kitson Kelly
4b235eca17
fix: check if sysFormatDiagnosticsHost is defined (#44344)
* fix: check if sysFormatDiagnosticsHost is defined

* improve types
2021-06-03 17:05:48 -07:00
Daniel Rosenwasser
cec2fda9a5
Update LKG. (#44423) 2021-06-03 16:35:05 -07:00
Sheetal Nandi
9df7ecb38b
Handle strict flag when writing tsbuildinfo (#44394)
* Add test showing how setting strict is not preserved in tsbuildinfo
Test for #44305

* Handle strict flag when writing tsbuildinfo
Fixes #44305

* Apply suggestions from code review

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2021-06-03 16:14:58 -07:00
Oleksandr T
31f03f46f2
fix(44273): preserves 'override' modifier in JavaScript output (#44290) 2021-06-03 15:42:19 -07:00
Daniel Rosenwasser
9906092db2
Add flag to change catch variables' default types to unknown (#41013)
* Add test case for 'useUnknownInCatchVariables'.

* Add new 'useUnknownInCatchVariables' flag.

* Accepted baselines.

* Add test for catch variable explicitly typed as 'any'.

* Accepted baselines.

* Move option under 'strict'.

* Accepted baselines.

* 'useUnknownInCatchVariables' is strict in command line help.
2021-06-03 13:12:56 -07:00
Orta Therox
6baa1bec64
Improve non-ambient class and function merge error (#44352)
* Improve non-ambient class and function merge error

* Update baselines

* Update tests

Co-authored-by: Austin Cummings <austin@austincummings.com>
2021-06-03 14:08:04 +01:00
Orta Therox
9d345e7734
Rename TSConfig option categories (#42514)
* Update the category descriptions for the tsconfig options

* Gets tests green

* Whitespace change

* Drop command line options from --init

* Go back to the old re-build baseline

* Fix numbers

* Remove formatting options from --showconfig

* Dpon't show output formatting changes in showConfig

* Update baselines

* Update baselines
2021-06-03 12:21:04 +01:00
TypeScript Bot
d8e9f69519 Update package-lock.json 2021-06-03 06:36:35 +00:00
Sheetal Nandi
d2516fa95b
Tsserver tests can be baselined (#44326)
* Tests to baseline tsserver instead of checking
Also ensures inferred and auto import projects have name per project service

* Log structureIsReused value

* more baselines
2021-06-02 11:22:01 -07:00
Isabel Duan
9c50cb925e
Fixes subset of bugs (three tests fixed) listed in issue #41974 (#44367)
* some fixes for 41974

* linted

* fixed todo messages for readability
2021-06-02 09:32:19 -07:00
TypeScript Bot
df6e3af022 Update package-lock.json 2021-06-02 06:50:26 +00:00
Anders Hejlsberg
391f9ffb85
Strict optional properties (#43947)
* Introduce --strictOptionalProperties compiler switch

* Accept new baselines

* Removing missingType when printing back optional properties

* Accept new baselines

* Fix linting issue

* Use getNonMissingTypeOfSymbol in getTypeOfSymbolAtLocation

* Properly elaborate errors involving optional properties

* Accept new baselines

* Properly check optional properties in tuple types

* Accept new baselines

* Add missing tuple type check

* More permissive check of strict optional properties and index signatures

* Add tests

* Fix lint issues

* Accept new baselines
2021-06-01 14:52:16 -07:00
Orta Therox
b603a04eed
Switch references to master to main in the codebase + validating infra post-main migration (#44347)
* Update package.json

* Remove references to master in the codebase

* Add more master - main
2021-06-01 20:44:18 +01:00
Ryan Cavanaugh
4c018818c1
Add a testcase that fails when someone tried to make an Object.keys PR (#44368) 2021-06-01 10:58:59 -07:00
TypeScript Bot
663b19fe4a Update package-lock.json 2021-05-29 06:38:18 +00:00
Wesley Wigham
09a21ce7c6
Consider inferences between mapped type templates lower priority (#44126) 2021-05-28 21:07:39 -07:00
Oleksandr T
1f4c8708c2
fix(44123): forbid convert to async for generator callbacks (#44147) 2021-05-28 14:42:09 -07:00
TypeScript Bot
e34b2adcae Update package-lock.json 2021-05-28 06:32:26 +00:00
Anders Hejlsberg
9aa50d6475
Fix unintended 'as const' name lookup error (#44311)
* Fix logic for methods in isTypeParameterPossiblyReferenced

* Add regression tests
2021-05-27 17:23:28 -07:00
Sheetal Nandi
817e45d1c1
Dont update timestamps of output files if noEmit was specified (#44306)
* Add failing test for #44303

* Dont update timestamps of output files if noEmit was specified.
Fixes #44303
2021-05-27 17:09:30 -07:00
Wesley Wigham
7c31d97cbf
Move string trim methods from utilities to core (#44308) 2021-05-27 14:20:23 -07:00
Sheetal Nandi
8721dd06f1
Add type brands for fileId and fileIdListId (#44280) 2021-05-27 11:15:13 -07:00
Sheetal Nandi
6329a0df90
Add traces for module resolution reuse (#44282) 2021-05-27 11:14:12 -07:00
TypeScript Bot
5fde87135f Update package-lock.json 2021-05-27 06:20:37 +00:00
Sheetal Nandi
32323ce7fb
redirectsTarget is keyed with Path (#44278)
* redirectsTarget is keyed with Path

* sourceFileToPackageName to keyed with Path

* feedback
2021-05-26 16:50:14 -07:00
Andrew Branch
b1eaf3e170
Ensure AutoImportProviderProject can share source files with main program (#44274)
* Ensure AutoImportProviderProject can share source files with main program

* Revert package-lock change

* Add back reclassified options
2021-05-26 16:47:40 -07:00
Sheetal Nandi
2ffd35de4d
More updates to program reuse with different option changes (#44276) 2021-05-26 15:57:43 -07:00
Sheetal Nandi
3442d311cf
Fix outFile check (#44277) 2021-05-26 15:57:30 -07:00
Sheetal Nandi
54fbeb511d
Use correct state when getting it from redirected program (#44275)
Eg. program can backup and restore state changing the state object and we want to release program on the correct one
This ensure program is released correctly when there are declaration emit errors during tsc --build
2021-05-26 15:31:26 -07:00
Oliver Joseph Ash
3e29397d74
fix(44249): JSX: "extract to constant" generates invalid code when using fragment syntax (#44252)
Fixes https://github.com/microsoft/TypeScript/issues/44249
2021-05-26 13:24:02 -07:00
Nathan Shively-Sanders
459bd19941
Add unqualified JSDoc member references (#44202)
* Add unqualified JSDoc member references

This allows unqualified references like:

```ts
class Zero {
 /** @param buddy Must be {@link D_HORSE} or {@link D_DOG}. */
 deploy(buddy: number) { }
 static D_HORSE = 1
 static D_DOG = 2
}
```

I surveyed @see and @link again to estimate how common this is. I found
a little over 200 uses, which is around 2%. Sorted by frequency, this
*is* the next feature on the list, along with the `module:` prefix.
So I think this is about the right point to stop adding code.

In this case, however, I liked most of the uses -- there were a lot
of deprecated functions that referenced a function just below, where it
would be wordy to qualify the name, but the reader would benefit from a
link.

Note that unqualified references do *not* work inside type or object
literals. The code I ended up with is quite complicated and I didn't
observe any uses in the wild.

Fixes #43595

* Remove type/object literal container check

Since they don't work anyway
2021-05-26 09:54:05 -07:00
Andrew Casey
3ffa245f07
Cache parsed path mapping patterns (#44078)
* Cache parsed path mapping patterns

If a project has many of them (e.g. 1800), parsing the patterns
repeatedly can take up a lot of time.

* Move cache to ConfigFileSpecs

* Inline constants

* Simplify cache access
2021-05-26 09:40:42 -07:00
TypeScript Bot
ddd3cf9406 Update package-lock.json 2021-05-26 06:17:14 +00:00
Oleksandr T
4559855c64
feat(44190): check misspelled base members in override checks (#44213) 2021-05-25 21:24:28 -07:00
Sheetal Nandi
b7b4856944
Refactor tsbuild watch tests (#44258) 2021-05-25 17:01:06 -07:00
Anders Hejlsberg
3938958d36
Properly remove generic types that are constrained to 'null | undefined' in getNonNullableType (#44219)
* Improve getNonNullableType function

* Add tests

* More closely match previous behavior

* Add non-strict mode test
2021-05-25 11:40:28 -07:00