32703 Commits

Author SHA1 Message Date
Anders Hejlsberg
0d2aeb7c65
Improve checks for infinitely expanding recursive conditional types (#46326)
* Improve checks for infinitely expanding recursive conditional types

* Accept new baselines

* Add regression tests

* Remove 'export' modifier

* Accept new baselines
2021-10-13 07:08:01 -07:00
TypeScript Bot
315b807489 Update package-lock.json 2021-10-13 06:06:54 +00:00
Wesley Wigham
713afe2227
Set import mode on synthetic imports (#46327) 2021-10-12 16:23:37 -07:00
Yuya Tanaka
9e2fc16c32
Improve perf of unions with many primitives (#45220) 2021-10-12 16:07:21 -07:00
Oleksandr T
44deb84460
fix(45336): add a blank line before the comment expression to avoid disrupting return statement (#46287) 2021-10-11 16:41:49 -07:00
TypeScript Bot
68ff7380d2 Update package-lock.json 2021-10-11 06:06:14 +00:00
TypeScript Bot
feac9eb126 Update package-lock.json 2021-10-09 06:06:31 +00:00
Andrew Branch
64b8172f06
Auto-imports: fix some exports being incorrectly stored as re-exports of others due to key conflict (#45792)
* Ensure symbol key unique when target is a local symbol exported elsewhere

* Add test

* Support targets without declarations

* Best key yet

* A-ha moment

* Clean up types

* Update API

* Update unit test
2021-10-08 15:20:12 -07:00
TypeScript Bot
f6c0231f08 Update package-lock.json 2021-10-08 06:06:15 +00:00
csigs
613c43287b
LEGO: Merge pull request 46264
LEGO: Merge pull request 46264
2021-10-07 16:14:04 -07:00
Wesley Wigham
82822fc1e9
Use a binary search when looking for the token at a given position (#46250) 2021-10-07 15:06:18 -07:00
csigs
bbd9ff51f5
LEGO: Merge pull request 46260
LEGO: Merge pull request 46260
2021-10-07 10:13:49 -07:00
Nathan Shively-Sanders
8c270757b2
In plain JS files, only suggestion did-you-mean errors (#46151)
They will have code fixes, and are tuned for high precision. Others are
not.
2021-10-07 08:41:06 -07:00
csigs
fbff13105a
LEGO: Merge pull request 46255
LEGO: Merge pull request 46255
2021-10-07 04:15:20 -07:00
csigs
08361e3d3c
LEGO: Merge pull request 46248
LEGO: Merge pull request 46248
2021-10-06 16:14:13 -07:00
Wesley Wigham
7108646713
Fix extension automatic script kind detection for new extensions (#46205)
* Fix extension script kind detection for new extensions

* Accept (correct) changes to existing baselines affected by correct ScriptKind detection
2021-10-06 13:23:54 -07:00
Wesley Wigham
ed9c522fd6
Accept new moduleResolution options on commandline (#46239) 2021-10-06 13:17:27 -07:00
csigs
cb158e7eb6
LEGO: Merge pull request 46238
LEGO: Merge pull request 46238
2021-10-06 10:14:06 -07:00
TypeScript Bot
f8cb5fa1d7 Update package-lock.json 2021-10-06 06:06:16 +00:00
Wesley Wigham
1cee9731d2
Properly support scoped package self name lookups (#46212) 2021-10-05 12:41:44 -07:00
Wesley Wigham
47cd4d3ecf
Only set package data map under watch mode (#46211) 2021-10-05 11:13:26 -07:00
Wesley Wigham
a0cf126513
Limit package.json realpath lookup to only successful resolutions (#46209) 2021-10-05 10:24:08 -07:00
chenjigeng
d60747f043
Feat/quick fix for types (#42126)
* feat: add quick fix for types

* feat: add test case for quick fix of types

* feat: add did-you-mean error when Cannot_find_name_0 and Cannot_find_namespace_0

* feat: add Cannot_find_namespace_0_Did_you_mean_1 error and only suggest when resolve type

* feat: update baselines

* feat: update baselines

* feat: update baselines

* chore: fix style problem

* Always suggest spelling corrections

* suggest primitives instead of their wrappers

* Add primitives to suggestions

Instead of altering wrappers to look like primitives.

* add semicolons

* revert unneeded change

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2021-10-05 08:14:16 -07:00
TypeScript Bot
ee24e2ee7e Update package-lock.json 2021-10-05 06:06:56 +00:00
csigs
5423501c37
LEGO: Merge pull request 46203
LEGO: Merge pull request 46203
2021-10-04 10:14:44 -07:00
TypeScript Bot
91117b6763 Update package-lock.json 2021-10-04 06:07:14 +00:00
TypeScript Bot
a0b6eadda0 Update package-lock.json 2021-10-03 06:06:00 +00:00
csigs
66182554c8
LEGO: Merge pull request 46179
LEGO: Merge pull request 46179
2021-10-02 22:14:20 -07:00
csigs
f3cc868499
LEGO: Merge pull request 46178
LEGO: Merge pull request 46178
2021-10-02 16:14:17 -07:00
csigs
33581aedbd
LEGO: Merge pull request 46173
LEGO: Merge pull request 46173
2021-10-02 04:15:28 -07:00
csigs
49fbeefcf1
LEGO: Merge pull request 46170
LEGO: Merge pull request 46170
2021-10-01 22:17:03 -07:00
csigs
a6af833d14
LEGO: Merge pull request 46168
LEGO: Merge pull request 46168
2021-10-01 16:14:26 -07:00
Or Ouziel
b2d2f085e2
improve response time of invalid rename attempts (#46158)
* improve response time in invalid rename attempts

* account for simplifiedResult and revert unrelated change
2021-10-01 15:07:54 -07:00
Wesley Wigham
a02a7ab8e9
Follow and respect export maps when generating module specifiers (#46159)
* Follow and respect export maps when generating module specifiers

* Type baseline updates from master merge
2021-10-01 13:54:07 -07:00
csigs
9ed49b6ba7
LEGO: Merge pull request 46161
LEGO: Merge pull request 46161
2021-10-01 10:13:58 -07:00
Orta Therox
1a000c8422
Fix main (#46160) 2021-10-01 09:50:00 -07:00
Wesley Wigham
ccc19092ff
Modify synthetic default generation code for dual-mode module resolution (#46156) 2021-10-01 09:18:44 -07:00
Orta Therox
016d78b09e
Allow for class static vars to be called static (#44813)
* Allow for class static vars to be called static - re: #41127

* Add the baselines
2021-10-01 14:28:08 +01:00
Alex Munoz
95ef2a503d
feat: display the tsconfig generated when running tsc --init (#45930)
* feat: display the tsconfig generated when running tsc --init

* fix: fix lint issues

* refactor: minor changes
2021-10-01 14:08:06 +01:00
Joel Einbinder
46a12fdb8a
fix(sourcemap): accept a sourceMappingURL that ends with a newline (#45983)
* fix(sourcemap): accept a sourceMappingURL that ends with a newline

* Update src/compiler/sourcemap.ts

Co-authored-by: Wesley Wigham <wwigham@gmail.com>
2021-10-01 05:16:05 -07:00
TypeScript Bot
cadd115a55 Update package-lock.json 2021-10-01 06:06:44 +00:00
Wesley Wigham
612c92d603
Track source and target relationship stack depth seperately, only increase on change in value (#41821)
* Track source and target relationship stack depth seperately, only increase on change in value

* Add baselines for test from #43485

* Bail on unwrapping conditional constraints on the source side when the source conditional is already known to be spooling out of control

* More usage of isDeeplyNestedType to block _specifically_ conditional recursion on only one side

* Negative cases of getNarrowedType that match the exact type should be filtered out, even when generic

* Add test and fix for #44404

* Swap to manually specifying left and right recursion

* Rename Left -> Source, Right -> Target

Co-authored-by: Andrew Branch <andrew@wheream.io>
2021-09-30 16:58:40 -07:00
Andrew Branch
96f259ddcc
Minimal fix for auto-importing node_modules in node12/nodenext (#46148) 2021-09-30 13:42:06 -07:00
Oleksandr T
d613748932
fix(45919): allow using JSDoc types for arrow function with type predicate (#45952) 2021-09-30 10:50:25 -07:00
Oleksandr T
e0f436c628
feat(36080): forbid to use JSDoc visibility modifiers in private fields (#46056) 2021-09-30 09:48:56 -07:00
TypeScript Bot
e4d9282b4b Update package-lock.json 2021-09-30 06:06:47 +00:00
Kagami Sascha Rosylight
2161e1852f
Add module: es2022 (#44656)
Closes #44653
2021-09-29 17:44:57 -07:00
Anders Hejlsberg
5ec836db82
Fix issues + Support template literal types as discriminants (#46137)
* Fix issues + Support template literal types in discriminants

* Add tests

* Address CR feedback
2021-09-29 17:38:43 -07:00
csigs
f09c5e80c6
LEGO: Merge pull request 46138
LEGO: Merge pull request 46138
2021-09-29 16:13:38 -07:00
Oleksandr T
e96c10fe0c
fix(26635): allow casts only when JSDoc type directly attached to an expression (#45960) 2021-09-29 12:16:27 -07:00