Anders Hejlsberg
9d2a2c9634
Add tests
2019-06-06 13:33:36 -07:00
Anders Hejlsberg
59dc85797e
Add regression test
2019-05-31 11:04:02 -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
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
Ron Buckton
dfd28d2751
Fix handling of empty 'types', 'typings', etc. fields in package.json ( #31539 )
2019-05-23 17:19:32 -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
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
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
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
Anders Hejlsberg
ee59cee381
Add regression test
2019-05-10 09:56:17 -07:00
Andrew Branch
56b19c9bf0
Merge pull request #31119 from andrewbranch/bug/31020
...
Emit grammar error on quoted constructors and class fields named “constructor”
2019-05-01 10:42:16 -10:00
Andrew Branch
90d3acf6c7
Merge pull request #31078 from andrewbranch/bug/30752
...
Fix symbol merging of augmentations to pattern ambient modules
2019-04-30 06:18:23 -10:00
Forbes Lindesay
3ce3cde493
Allow Boolean() to be used to perform a null check ( #29955 )
...
* Allow Boolean() to be used to perform a null check
* Add missing test case output
2019-04-30 08:09:31 -07:00
Anders Hejlsberg
be409fad84
Merge pull request #31137 from Microsoft/fixConditionalInference
...
Fix conditional type inference involving any or unknown
2019-04-30 06:26:02 -07:00
Anders Hejlsberg
a539887893
Merge pull request #31150 from Microsoft/fixReadonlyIndexedAccess
...
Fix readonly indexed access used in indexed access type
2019-04-29 16:59:13 -07:00
Ron Buckton
2d8527f3f0
Merge pull request #30779 from Microsoft/relateDiscriminants
...
Relate source types covered by a target discriminated union
2019-04-29 16:58:27 -07:00
Ron Buckton
26fd6dafa6
Relate a source type that is sufficiently covered by a target discriminated union
2019-04-29 15:46:37 -07:00
Anders Hejlsberg
bbce336268
Add additional tests
2019-04-28 14:12:00 -07:00
Anders Hejlsberg
3050c62251
Add regression test
2019-04-28 13:58:58 -07:00
Ron Buckton
57a8ee1507
Fix binder performance regression
2019-04-27 16:47:27 -07:00
Anders Hejlsberg
078375765b
Add regression test
2019-04-27 09:56:11 -07:00
Wenlu Wang
454b4280b1
check more case for empty binding patten ( #25263 )
...
* check more case for empty binding patten
* refactor binding pattern checking getWidenedType
* fix spelling
* fix merge and rebase
2019-04-26 14:00:04 -07:00
Clay Miller
d934401265
Change the type of 'uriComponent' (passed to 'encodeURIComponent') from 'string' to 'string | number | boolean'. Fixes #18159 ( #31103 )
...
- According to the ECMAScript 5.1 spec (§15.1.3.4), 'encodeURIComponent' invokes the abstract operation 'ToString': https://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.4
- In the spec (§9.8), 'ToString' accepts an 'Undefined', 'Null', 'Boolean', 'Number', 'String' or 'Object' argument: https://www.ecma-international.org/ecma-262/5.1/#sec-9.8
- TypeScript’s 'StringConstructor' accepts an argument with type 'any': b0100100a1/lib/lib.es5.d.ts (L518)
2019-04-26 13:07:14 -07:00
Andrew Branch
e81fa2198d
Emit error on class fields named "constructor"
2019-04-25 17:30:41 -07:00
Anders Hejlsberg
95413f0a24
Merge pull request #31000 from Microsoft/ignoreStringIndexSignaturesOnly
...
Ignore string (but keep numeric) index signatures from constraints
2019-04-25 17:01:46 -07:00
Andrew Branch
c5e6913ede
Add grammar error on quoted constructors for TS 3.5
2019-04-25 15:44:23 -07:00
Klaus Meinhardt
b45df892a8
emit error on destructuring of rest property ( #29609 )
...
Fixes : #26005
2019-04-25 13:33:49 -07:00
Andrew Branch
72f30a8308
Add test for quoted constructors
2019-04-25 11:35:10 -07:00
Wenlu Wang
583edce6b0
fix compiler crash ( #25925 )
2019-04-25 10:51:36 -07:00
Andrew Branch
d69f9f3328
Add bad test case
2019-04-24 08:44:24 -07:00
Andrew Branch
f2ec02b971
Add additional test to ensure merging more than augmentations still works
2019-04-23 13:26:00 -07:00
Andrew Branch
7409a04010
Fix merging module augmentations to pattern ambient modules
2019-04-23 12:06:56 -07:00
Daniel Rosenwasser
2eea21636b
Merge pull request #29242 from Kingwl/attach_property_to_default_export
...
add transformer for emit add property to default export
2019-04-18 23:30:48 -04:00
Andrew Branch
b6a0988052
Merge pull request #30776 from andrewbranch/feature/10178
...
Add flag to allow access to UMD globals from modules
2019-04-18 18:05:44 -07:00
Anders Hejlsberg
3a89fead70
Merge branch 'master' into ignoreStringIndexSignaturesOnly
...
# Conflicts:
# tests/baselines/reference/keyofAndIndexedAccess2.errors.txt
# tests/baselines/reference/keyofAndIndexedAccess2.js
# tests/baselines/reference/keyofAndIndexedAccess2.symbols
# tests/baselines/reference/keyofAndIndexedAccess2.types
# tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts
2019-04-18 11:31:06 -07:00
Anders Hejlsberg
4d0244c798
Add regression test
2019-04-17 15:05:57 -07:00
Anders Hejlsberg
07d259593a
Add regression test
2019-04-17 12:37:01 -07:00
Wesley Wigham
d405662eb6
Explicitly encode keyof behaviors for never and unknown into getIndexType ( #30753 )
...
* Explicitly encode keyof behaviors for never and unknown into getIndexType
* Merge similar cases
2019-04-15 17:52:13 -07:00
Anders Hejlsberg
2c951b3ca9
Add regression test
2019-04-13 08:24:27 -10:00
Anders Hejlsberg
6282645e3c
Merge pull request #30857 from Microsoft/fixInferenceToIntersection
...
Fix inference to intersections
2019-04-12 07:34:40 -10:00