Andrew Casey
9f5310fd8d
Use the existing checkCrossProductUnion helper
2020-09-25 13:37:54 -07:00
Andrew Casey
6650496e85
Enforce a size limit in getSpreadType
...
When a union is spread into a union, the sizes are multiplied,
potentially resulting in an enormous union (especially if there are
repeated spreads). This check detects cases that used to run out of
memory.
Fixes #40754
2020-09-24 14:52:42 -07:00
Wenlu Wang
fc03982b73
Add missing visitor of template literal type ( #40738 )
...
* Add missing visitor of template literal type
* make linter happy
2020-09-24 12:48:29 -07:00
Andrew Branch
3b9eb1ebe9
Fix premature closing of AutoImportProviderProject for unbuilt monorepos ( #40620 )
...
* Fix premature closing of AutoImportProviderProject for unbuilt monorepos
* Update src/server/project.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update API baseline
* Don’t override hasRoots
* Update API baselines
* Really actually update baselines
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2020-09-24 10:05:07 -07:00
TypeScript Bot
a1a9d6d2f8
Update user baselines +cc @sandersn ( #40156 )
...
Co-authored-by: typescript-bot <typescript@microsoft.com>
2020-09-24 09:24:06 -07:00
Nathan Shively-Sanders
5305e4a44e
Fix spec links in README ( #40711 )
...
* Fix spec links in README
I forgot to update them.
* specify that the spec is archived
2020-09-23 08:57:11 -07:00
Wesley Wigham
a960463cf3
Allow pattern literal types like http://${string} to exist and be reasoned about ( #40598 )
...
* Allow pattern literal types like `http://${string} ` to exist and be reasoned about
* Allow bigint, number, null, and undefined in template holes
* Add test of the trivia case
* Handle `any` in template holes, add assignability rules for template -> template relations
* Explicitly test concatenated patterns
* PR Feedback
2020-09-23 01:08:58 -07:00
Wesley Wigham
a91c2879ef
Allow discrimination to identical object types when discriminating contextual types ( #40574 )
...
* Merge identical object types when discriminating contextual types
Co-authored-by: Orta <ortam@microsoft.com>
* Allow identical discriminants when discriminating, rather than trying to unify identical union members
* Fix lint
Co-authored-by: Orta <ortam@microsoft.com>
2020-09-23 00:51:14 -07:00
Wesley Wigham
ad2a07440c
Fix crash on js declaration emit of export assigned default augmented function ( #40596 )
...
* Fix crash on js declaration emit of export assigned default augmented function
* {sp}
2020-09-23 00:50:12 -07:00
Wesley Wigham
83574ba135
Reorder LKG tasks so protocol build isn't using partial LKG ( #40717 )
...
* Reorder LKG tasks so protocl build isnt using partial LKG
* Update scripts/produceLKG.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2020-09-23 00:49:12 -07:00
uhyo
61910e8c97
Fix missing constraints for parenthesized infer T ( #40406 )
...
* add tests
* consider parenthesized types in getInferredTypeParameterConstraint
* update tests
2020-09-23 00:48:40 -07:00
Wesley Wigham
10b240cde3
Allow an infer type node to resolve its own name ( #40483 )
2020-09-22 21:21:13 -07:00
Alex T
78830f3be2
fix(40510): add element access expressions support in convertToOptionalChainExpression ( #40524 )
2020-09-22 18:17:17 -07:00
Andrew Branch
9eb6424b8f
Fix indentation of arrow functions returning parenthesized expressions ( #40677 )
...
* Fix indentation of arrow functions returning parenthesized expressions
* Add more test cases
2020-09-22 17:16:09 -07:00
csigs
aa30121dd1
LEGO: Merge pull request 40712
...
LEGO: Merge pull request 40712
2020-09-22 17:11:25 -07:00
csigs
8f9ed58328
LEGO: check in for master to temporary branch.
2020-09-23 00:10:56 +00:00
Anders Hejlsberg
5d6cce5ca7
Const contexts for template literals ( #40707 )
...
* Support const assertions with template literal expressions
* Add tests
* Accept new baselines
2020-09-22 13:11:17 -10:00
Alex T
c5a28fcdec
fix(39589): add await before return promise expression ( #39649 )
2020-09-22 15:34:56 -07:00
csigs
d93590e63d
LEGO: Merge pull request 40705
...
LEGO: Merge pull request 40705
2020-09-22 11:11:03 -07:00
csigs
ace0732e72
LEGO: check in for master to temporary branch.
2020-09-22 18:10:35 +00:00
TypeScript Bot
7c6462aa10
Update package-lock.json
2020-09-22 06:21:20 +00:00
csigs
e7cc46b148
LEGO: Merge pull request 40690
...
LEGO: Merge pull request 40690
2020-09-21 23:11:05 -07:00
csigs
d2e8831c5f
LEGO: check in for master to temporary branch.
2020-09-22 06:10:37 +00:00
Jesse Trinity
ce338a4022
fix(40640) add missing notApplicableReason in protocol ( #40680 )
...
* update protocol
* fix lint error
2020-09-21 18:11:46 -07:00
csigs
614b5e3e9f
LEGO: Merge pull request 40686
...
LEGO: Merge pull request 40686
2020-09-21 17:11:18 -07:00
csigs
7d4a801f0a
LEGO: check in for master to temporary branch.
2020-09-22 00:10:49 +00:00
Alex T
587252cbe9
feat(40674): make error messages more consistent ( #40675 )
2020-09-21 13:22:15 -07:00
Alex T
0310b530d8
feat(40663/40664): improve error messages for assignment assertions '!' ( #40669 )
2020-09-21 11:20:01 -07:00
csigs
9c0eb229ef
LEGO: Merge pull request 40672
...
LEGO: Merge pull request 40672
2020-09-21 11:11:16 -07:00
csigs
63c518e819
LEGO: check in for master to temporary branch.
2020-09-21 18:10:43 +00:00
Anders Hejlsberg
fbce4f6c98
Intrinsic string types ( #40580 )
...
* Introduce Uppercase<T> and Lowercase<T> intrinsic types
* Accept new API baselines
* Add Uppercase/Lowercase/Capitalize/Uncapitalize to lib.d.ts
* Update fourslash
* Add an 'intrinsic' keyword
* Update template literal type tests
* Accept new API baselines
* Minor fixes
* Switch Capitalize<T> and Uncapitalize<T> to intrinsic types
* Add tests
* Accept new baselines
* Accept new baselines
* Remove template literal type casing modifiers
* Update tests
* Accept new baselines
* Add more tests
* Normalize nested template literal types
* Add normalization tests
* Accept new baselines
* Update tests
2020-09-21 07:09:29 -10:00
Anders Hejlsberg
ce3dbef5f7
Support properties of mapped types in assertion control flow analysis ( #40482 )
...
* Support properties of mapped types in assertion control flow analysis
* Add regression test
* Accept new baselines
2020-09-21 07:07:29 -10:00
Tim van der Lippe
8cd4793a9c
Fix typo in isChangedSignagure ( #40668 )
...
The correct spelling is `isChangedSignature`.
2020-09-21 08:33:37 -07:00
Anders Hejlsberg
17c7c261d4
Properly preserve modifiers in homomorphic mapped types with 'as' clauses ( #40633 )
...
* Use original property name to fetch source property for modifiers
* Add regression test
* Accept new baselines
2020-09-19 06:12:39 -10:00
csigs
8cdf5a20d9
LEGO: Merge pull request 40641
...
LEGO: Merge pull request 40641
2020-09-18 17:11:17 -07:00
csigs
c67fe4c248
LEGO: check in for master to temporary branch.
2020-09-19 00:10:42 +00:00
Hikari Hayashi
f1ac8cd93f
Fix children prop for react-jsx and react-jsxdev ( #40630 )
...
* Fix children prop for `react-jsx` and `react-jsxdev`
* Add tests
2020-09-18 14:26:20 -07:00
Alex T
6c6ddfe5c0
fix(39899): include in NavigationBar default exported call expression arguments ( #40412 )
2020-09-18 13:06:56 -07:00
TypeScript Bot
0c08138490
Update package-lock.json
2020-09-18 06:20:48 +00:00
Andrew Branch
735a67a05e
Fix iterable contextual type ( #40592 )
2020-09-17 10:42:47 -07:00
Alex T
d779a19053
fix(40432): show as keyword in function context ( #40481 )
2020-09-17 02:15:48 -07:00
TypeScript Bot
02f5001839
Update package-lock.json
2020-09-17 06:20:29 +00:00
Wenlu Wang
f66c8e6a69
Fix missing renamed compiler flags ( #40606 )
2020-09-16 22:41:02 -07:00
TypeScript Bot
a5babe1c8f
Update package-lock.json
2020-09-16 06:20:25 +00:00
csigs
1e7214fa6d
LEGO: Merge pull request 40579
...
LEGO: Merge pull request 40579
2020-09-15 17:11:33 -07:00
csigs
4855759ca0
LEGO: check in for master to temporary branch.
2020-09-16 00:11:01 +00:00
csigs
23cb2d844f
LEGO: Merge pull request 40573
...
LEGO: Merge pull request 40573
2020-09-15 11:11:11 -07:00
csigs
0425b7ae24
LEGO: check in for master to temporary branch.
2020-09-15 18:10:42 +00:00
TypeScript Bot
a8456085e3
Update package-lock.json
2020-09-15 06:20:25 +00:00
csigs
b908d6698e
LEGO: Merge pull request 40566
...
LEGO: Merge pull request 40566
2020-09-14 23:11:13 -07:00