Wesley Wigham
e982240500
Instantiating a signature in the context of another should infer from return type predicates if they match up ( #30242 )
...
* Instantiating a signature in the context of another should infer from return type predicates if they match up
* Invert condition per PR feedback
2019-03-07 17:39:58 -08:00
Wesley Wigham
4c9ad08610
Add fix for webpack history merge bug ( #29339 )
...
* Add fix for webpack history merge bug
* Add test case
2019-03-07 13:34:28 -08:00
Sheetal Nandi
fe9f42480a
Handle error when type parameter of mapped type uses private type
...
Fixes #30201
2019-03-06 13:30:48 -08:00
Anders Hejlsberg
d9bb869341
Add regression test
2019-03-01 16:34:23 -08:00
Wesley Wigham
b1a73ab560
Resolve aliases to jsx namespace symbol ( #30160 )
2019-02-28 13:52:57 -08:00
Wesley Wigham
a6a3ae00a6
Only collect inferences which actually have inferences into the returnMapper ( #30111 )
2019-02-28 12:46:24 -08:00
Wesley Wigham
13c08ab32b
Use identity with the permissive instantation to detect nongenric instances and disable variance probing on nongeneric instances ( #29981 )
...
* Use identity with the restrictive instantation to detect nongenric instances and disable variance probing on nongeneric instances
* Generalize to also include interfaces, add test case, still perform argument comparisons for postive comparisons if possible
* Actually accept baselines, lol
* Reduce deep nesting limit just a bit so yargs still builds
* Handle circular identities in isNonGeneric
* Use a simple traversal of the types rather than the restrictive instantiation
* Cache the bits using an existing field to further reduce any time nongeneric check takes
* Revert to using an existing mapper, use permissive > restrictive
* Revert constant change
* And revert the comment, too
2019-02-27 14:12:30 -08:00
Wesley Wigham
288851066b
Dont create a union type to infer conditional type branches ( #30010 )
2019-02-26 13:43:41 -08:00
Wesley Wigham
2533d8294e
Make a fresh empty object literal not a subtype of a type with an index signaure ( #29975 )
...
* Forbid inferable index checkign during subtype relationship checking
* Merge object.values and object.entries overloads to work around subtype change
* Invert subtype relationship between fresh empty objects and non-empty object types
* Remvoe comment
* Revert lib change
* Remove trailing whitespace ffs
2019-02-26 13:43:22 -08:00
Wesley Wigham
c5061486a9
Retain substitution types through instantiation if possible ( #30059 )
2019-02-25 17:10:03 -08:00
Wesley Wigham
eafff75c2a
Remove diagnostic dependent output in structuredTypeRelatedTo ( #29817 )
...
* Unify variance probing error exceptions between interfaces/aliases
* Consistiently return false on variance probe failure
* Remove strictFunctionTypes early bail from getVariances so independent type parameters are correctly measured
* Fix lint, remove now-redundant change from covariant void check function
2019-02-19 11:39:16 -08:00
Wesley Wigham
84076a5535
Add diagnostic context for expando property declarations ( #29905 )
2019-02-13 22:54:33 -08:00
Anders Hejlsberg
15610faa9d
Update test
2019-02-10 15:18:45 -08:00
Kagami Sascha Rosylight
b3c179540a
String.prototype.{trimStart,trimEnd} hit stage 4
2019-02-08 00:51:23 +09:00
Kagami Sascha Rosylight
f525a89e87
Array.prototype.{flat,flatMap} hit stage 4
2019-02-08 00:10:34 +09:00
Wesley Wigham
8e5dcfbde5
Add try priors as finally lock label andecedents rather than pre finally label antecedents ( #29790 )
2019-02-06 16:59:26 -08:00
Kagami Sascha Rosylight
6249b4c704
Remove ES2018 transforms for ES2018 target ( #26315 )
...
* rename esnext.ts as es2018.ts
* remove ES2018 transforms for ES2018 target
* change target from esnext to es2018
* rename tests
2019-02-06 15:35:52 -08:00
Daniel Rosenwasser
4505eea92d
Merge pull request #29766 from Microsoft/USE-ALL-THE-ES2015-NAMES-WESLEY-WHAT-IS-SO-HARD-ABOUT-THAT
...
Expand "set your lib" suggestions to other commonly used ES2015 declarations
2019-02-05 18:31:16 -08:00
Daniel Rosenwasser
341f9cf1d6
Added test.
2019-02-05 18:01:41 -08:00
Ryan Cavanaugh
eed9db5ec5
Merge pull request #28465 from alangpierce/enforce-const-enum-access-for-isolatedmodules
...
Change isolatedModules to allow const enum declaration and disallow access
2019-02-05 16:36:58 -08:00
Anders Hejlsberg
0c5471ba5c
Add regression test
2019-02-03 15:23:21 -08:00
Alan Pierce
942b020081
Merge remote-tracking branch 'origin/master' into enforce-const-enum-access-for-isolatedmodules
2019-02-01 18:52:22 -08:00
Ryan Cavanaugh
f81ea89564
Merge pull request #29136 from ajafff/usedbeforedeclaration-objectspread
...
property is used before its initialization: check more nodes
2019-02-01 13:46:37 -08:00
Anders Hejlsberg
607f2ea4de
Merge pull request #29478 from Microsoft/fixContextualReturnTypes
...
Infer contextual types from generic return types
2019-02-01 12:31:08 -08:00
Anders Hejlsberg
8827bed0e7
Merge pull request #29647 from Microsoft/noConstraintsDuringInference
...
Only check constraints in final phase of type inference
2019-02-01 10:54:08 -08:00
Anders Hejlsberg
c58157573e
Add breaking change repros
2019-02-01 10:48:52 -08:00
Anders Hejlsberg
fffd77457a
Merge branch 'master' into fixContextualReturnTypes
...
# Conflicts:
# src/compiler/checker.ts
2019-02-01 10:28:50 -08:00
Ryan Cavanaugh
aad609c74f
Merge pull request #29298 from ajafff/this-reference-in-parameter
...
Allow referencing 'this' in parameters of functions in the constructor
2019-01-30 19:13:18 -08:00
Anders Hejlsberg
eb513a2035
Merge pull request #29576 from Microsoft/fixContextuallyTypedParameters
...
Fix inference for contextually typed parameters with initializers
2019-01-30 15:51:29 -08:00
Anders Hejlsberg
caa89cafde
Add regression test
2019-01-30 08:45:43 -08:00
Anders Hejlsberg
45af34d349
Add subtype reduction complexity limit test
2019-01-28 15:20:32 -08:00
Anders Hejlsberg
7c1bb14c93
Merge branch 'master' into fixContextualReturnTypes
2019-01-26 07:09:14 -08:00
Anders Hejlsberg
25ac1ed262
Merge branch 'master' into fixContextuallyTypedParameters
...
# Conflicts:
# src/compiler/checker.ts
2019-01-25 16:43:46 -08:00
Wesley Wigham
4da9d8bc87
Include index signatures of the source in mapped type template target inferences ( #29253 )
2019-01-25 15:22:35 -08:00
Alan Pierce
a60795f04a
Merge remote-tracking branch 'origin/master' into enforce-const-enum-access-for-isolatedmodules
...
This changes the new error code from TS2739 to TS2748.
2019-01-25 09:19:12 -08:00
Klaus Meinhardt
a9653bb5df
Merge branch 'master' of github.com:Microsoft/TypeScript into usedbeforedeclaration-objectspread
2019-01-25 15:50:27 +01:00
Klaus Meinhardt
d7cb14adbd
Merge branch 'master' into usedbeforedeclaration-objectspread
2019-01-25 15:49:14 +01:00
Anders Hejlsberg
1bc4389615
Add tests
2019-01-24 17:07:44 -08:00
Ron Buckton
469ab3fdd0
Merge branch 'master' into fix29006
2019-01-24 16:50:50 -08:00
Ryan Cavanaugh
d85c4e551e
Merge pull request #27121 from xl1/26977-typedarray
...
Allow non-number source for TypedArray.from
2019-01-24 13:42:43 -08:00
Anders Hejlsberg
71d70ef161
Merge pull request #29563 from Microsoft/fixSwitchControlFlow
...
Fix switch statement control flow logic
2019-01-24 10:36:52 -08:00
Anders Hejlsberg
500c4729e9
Add additional repro
2019-01-24 10:12:35 -08:00
Anders Hejlsberg
83f7f4d190
Add regression test
2019-01-24 09:30:46 -08:00
xiaofa
d7601b755f
fix trailing comma should not allowed in dynamic import argument
2019-01-24 18:16:34 +08:00
Ron Buckton
60639ce5a8
Replace most instances of getTextOfPropertyName in checker
2019-01-22 14:24:21 -08:00
Anders Hejlsberg
cf479fc384
Add regression test for #29168
2019-01-20 08:21:41 -08:00
kingwl
e8497096d8
Merge branch 'master' into improve_type_arguments_parser_1
2019-01-20 01:54:49 +08:00
Wesley Wigham
20285e66e9
Include all flow nodes made within try blocks as antecedents for catch or finally blocks ( #29466 )
...
* Include all flow nodes made within `try` blocks as antecedents for `catch` or `finally` blocks
* Fix typo
2019-01-18 14:43:31 -08:00
Anders Hejlsberg
4163d2dee4
Add tests
2019-01-17 17:16:52 -08:00
Wesley Wigham
addeff325b
Make the relationship between partial mapped types and the empty object not apply for subtype relationship ( #29384 )
2019-01-17 15:42:58 -08:00