Commit Graph

9173 Commits

Author SHA1 Message Date
gb714us
29f995829b Added test cases for JSXFragment span 2019-06-08 15:23:50 -07:00
Anders Hejlsberg
4ae3a54ba6 Merge pull request #31784 from microsoft/numericEnumMappedType
Numeric enums as key types in mapped types
2019-06-06 15:00:19 -07:00
Anders Hejlsberg
7e07669885 Generate declaration file from tests 2019-06-06 09:41:44 -07:00
Anders Hejlsberg
f8aaccdd1d Add tests 2019-06-05 16:55:08 -07:00
Wesley Wigham
38da682de7 Unify contextual signature type parameter assignment (#31574)
* Unify conditional signature type assignment

* Moonomorphism
2019-06-05 14:35:00 -07:00
Anders Hejlsberg
a5281ada54 Merge pull request #31687 from microsoft/enumImplicitIndexSignatures
Implicit index signatures for enum object types
2019-06-02 07:42:58 -07:00
Anders Hejlsberg
d6c323a21b Merge pull request #31711 from microsoft/fixDestructuringWithFallback
Fix destructuring with fallback
2019-06-01 17:30:07 -07:00
Anders Hejlsberg
86040e0699 Add more tests 2019-06-01 10:36:53 -07:00
Anders Hejlsberg
d0795afb48 Add regression tests 2019-05-31 16:53:46 -07:00
Wesley Wigham
41ce98b440 Propagate saved variance flags from cached comparisons (#31688)
* Propegate saved variance flags from cached comparisons

* Propegate variance a bit more selectively

* Add test

* Remove now-redundant code

* Fix misspelling and remove unneeded branch
2019-05-31 16:11:08 -07:00
Anders Hejlsberg
59dc85797e Add regression test 2019-05-31 11:04:02 -07:00
Anders Hejlsberg
cf1bceb9e4 Add tests 2019-05-30 17:35:10 -07:00
Anders Hejlsberg
7dc1f40dc1 Merge pull request #31680 from microsoft/fixGenericReturnTypeInference
Fix generic return type inference
2019-05-30 16:33:22 -07:00
Anders Hejlsberg
2b36fdd08b Add regression tests 2019-05-30 14:40:03 -07:00
Anders Hejlsberg
22475e8958 Add regression tests 2019-05-29 13:09:51 -07:00
Wesley Wigham
cd09cbbd5e Cache widened types (#31586)
* Cache widened types

* Fix lint
2019-05-28 13:13:46 -07:00
Wesley Wigham
e70f2af25d Defer union or intersection property type normalization (#31486)
* Defer union or intersection property type normalization

* Accept moved span
2019-05-28 10:51:47 -07:00
Daniel Rosenwasser
38f3b05cb1 31304 - Autocomplete for enum values fails when typing "/" (#31362)
31304 - Autocomplete for enum values fails when typing "/"
2019-05-24 16:17:25 -07:00
Andrew Branch
a06ab8532c Merge pull request #31560 from andrewbranch/bug/31485
Fix crash when creating a union signature from signatures that do and don’t have `this` types
2019-05-24 10:30:47 -07:00
Andrew Branch
9380b9f920 Merge pull request #31568 from andrewbranch/bug/31347
Fix containsPrecedingToken for tokens whose preceding token is a missing node
2019-05-24 10:29:21 -07:00
Anders Hejlsberg
7ff97d1393 Merge pull request #31572 from microsoft/normalizedIntersectionLimiter
Limit size of union types resulting from intersection type normalization
2019-05-23 17:57:33 -07:00
Ron Buckton
dfd28d2751 Fix handling of empty 'types', 'typings', etc. fields in package.json (#31539) 2019-05-23 17:19:32 -07:00
Wesley Wigham
bb4080c175 Collect _all_ symlinks a file may have witnessed when attempting to generate specifiers (#31571) 2019-05-23 17:17:24 -07:00
Anders Hejlsberg
53f37cfec3 Add test 2019-05-23 17:09:17 -07:00
Titian Cernicova-Dragomir
8ab0a25211 Improve error messages when indexing into a type (#31379)
* Improved error messages when indexing an object type with a literal string, a literal string union or a string.

* Added more specific message when using the indexing operator with an incompatible index argument.

* Fixed spelling and error message.
2019-05-23 15:27:50 -07:00
Andrew Branch
a2b40292fe Merge pull request #31542 from andrewbranch/bug/31481
Error when writing to rest element range of readonly tuple
2019-05-23 13:38:09 -07:00
Andrew Branch
7359ff8158 Add test 2019-05-23 13:33:38 -07:00
Andrew Branch
f97f57c155 Fix containsPrecedingToken for tokens whose preceding token is a missing node 2019-05-23 12:15:50 -07:00
Nathan Shively-Sanders
4d27361680 Allow JS with isolated modules (#31483)
* Allow JS with isolated modules

Previously legacy JS code was not allowed; it was required to use ES6
module syntax. Unfortunately, the check happens after parsing but before
binding, and the commonjs module indicator isn't set until binding
because it's not syntactically simple like the ES6 module indicator,
which is set during parsing.

So I decided that JS should be allowed during isolatedModules
unconditionally. We're not going to be transforming it anyway.

* Update baselines

* Switch test to outDir instead of noEmit
2019-05-23 11:09:28 -07:00
Sheetal Nandi
ae7a1b4f56 Merge pull request #31541 from microsoft/packageId
Always use resolved file to figure out subModule name in package id
2019-05-23 10:50:13 -07:00
Anders Hejlsberg
e6013335b9 Merge pull request #31537 from microsoft/fixIndexedAccessConstraint
Fix indexed access constraint
2019-05-22 18:35:15 -07:00
Andrew Branch
300cbef071 Don’t crash when creating a union signature from signatures that do and don’t have this types 2019-05-22 17:42:05 -07:00
Andrew Branch
9f6791a5ab Error when writing to readonly tuple in rest element range 2019-05-22 15:03:17 -07:00
Andrew Branch
eecb6d9049 Add failing test 2019-05-22 13:39:05 -07:00
Sheetal Nandi
431f0d6d8c Add test case for #30429 2019-05-22 11:22:07 -07:00
Ron Buckton
6a559e37ee Fix crash when checking invalid object rest (#31530) 2019-05-22 11:20:57 -07:00
Ron Buckton
c3055e585d Fix compiler crash with object rest in catch binding (#31522) 2019-05-22 11:20:07 -07:00
Ron Buckton
b3dc32fec7 Reset error record in downlevel for-of (#31519) 2019-05-22 11:18:07 -07:00
Ron Buckton
7611c5b931 Fix for computed properties in instance initializers (#31517) 2019-05-22 11:17:54 -07:00
Nathan Shively-Sanders
b36c8a0690 Make anyArray.filter(Boolean) return any[], not unknown[] (#31515)
* Add this-parameter workaround to Array.filter

Allows anys.filter(Boolean) to once again return any[], not unknown[].

* Add any constraint to Boolean factory function

I want to test how well this works.

* Remove Boolean factory type guard

* Remove typeGuardBoolean test
2019-05-22 09:45:41 -07:00
Anders Hejlsberg
2fd4aaee92 Add regression test 2019-05-22 06:54:16 -07:00
Sheetal Nandi
38f689d19e Merge pull request #31484 from microsoft/completionsSorting
Add sortText depending scope of symbols
2019-05-21 12:59:01 -07:00
Wesley Wigham
07d850cf1c Prevent type parameter printing from recuring on the same symbol (#31453) 2019-05-20 16:43:55 -07:00
Sheetal Nandi
00cea41b65 Add sortText depending scope of symbols
Fixes #15024
2019-05-20 15:53:51 -07:00
Nathan Shively-Sanders
9052804576 Test docCommentTemplate for prototype methods (#31477)
This works in 3.5, but didn't in 3.2. Adding a test to make sure it
stays working.
2019-05-20 12:50:29 -07:00
Anders Hejlsberg
907664c31c Merge pull request #31454 from microsoft/fixThisTypeIndexSignature
Permit assignment through index signature of 'this' type
2019-05-20 07:02:52 -07:00
Anders Hejlsberg
c6a670d26c Add regression test 2019-05-17 15:59:01 -07:00
Nathan Shively-Sanders
eeba30afc8 Fix infinite loop: module.exports alias detection (#31436)
* Fix infinite loop: module.exports alias detection

Previously, module.exports alias detection in the binder could enter an
infinite recursion. Now it does not.

Notably, there are *two* safeguards: a counter limiter that I set at
100, and an already-seen set. I actually prefer the counter limiter code
because it's foolproof and uses less memory. But it takes 100
iterations to escape from loops.

* fix space lint

* Remove already-seen map
2019-05-17 12:50:39 -07:00
Andrew Branch
15daf42b2c Merge pull request #31028 from andrewbranch/feature/smart-select
Smart Select language service API
2019-05-16 09:45:05 -07:00
Daniel Rosenwasser
d484163d0f Merge pull request #31262 from rpgeeganage/new_keyword_consistent_resolve
Quick info on 'new' keyword should be the same as that of resolved expression
2019-05-15 00:36:38 -07:00