Commit Graph

12893 Commits

Author SHA1 Message Date
Anders Hejlsberg
8ac18be108 Merge pull request #29082 from Microsoft/widenIntersectionTypes
Properly widen intersection types
2018-12-18 12:53:33 -08:00
Wesley Wigham
4e3bc9e35a Reset constEnumOnlyModule flag on relevant symbol merges in binder (#29079) 2018-12-18 12:31:53 -08:00
Anders Hejlsberg
67491414f1 Handle intersection types in getWidenedType 2018-12-18 11:50:29 -08:00
Daniel Rosenwasser
3edd2d6893 Merge pull request #28896 from JoshuaKGoldberg/n-identifier-after-numeric-literal-error
Better error message for invalid bigint literals ending with n
2018-12-18 11:38:06 -08:00
Wesley Wigham
4f7184a587 Fix all new lint failures (#29080) 2018-12-18 11:34:02 -08:00
Josh Goldberg
0d7e3f82d4 Stretched the error to the end of 'n's 2018-12-18 00:56:00 -08:00
Daniel Rosenwasser
65b230e5ab Merge pull request #29069 from weswigham/remove-duplicate-function
Remove duplicate function from checker
2018-12-17 16:48:14 -08:00
Anders Hejlsberg
c52e5985b7 Merge pull request #29068 from Microsoft/noGenericEmptyObject
Generic types should never be considered empty objects
2018-12-17 15:59:42 -08:00
Wesley Wigham
55852c495e Remove duplicate function from checker 2018-12-17 15:52:32 -08:00
Anders Hejlsberg
93c0f0ca0f isEmptyObjectType should check that argument is not generic mapped type 2018-12-17 14:08:01 -08:00
Ali Sabzevari
1a5ecbb6ac #28977 Change error message according to review comments 2018-12-14 23:42:59 +01:00
Ali Sabzevari
99c7fc4a88 #28977 Change const enum error message 2018-12-14 21:23:46 +01:00
Daniel Rosenwasser
4d74f67325 Merge pull request #28888 from Microsoft/numericPropertyAccess
Avoid adding a dot when comment a property acccess's expression has trailing comments
2018-12-13 15:18:27 -08:00
Wesley Wigham
5788446aa1 Use contextual parameter types over binding pattern initializer types (#28967)
* Use contextual parameter types over binding pattern initializer types

* Remove unneeded check
2018-12-12 15:39:32 -08:00
Anders Hejlsberg
fecbdb68bd Merge pull request #28965 from Microsoft/simplifyIndexedAccess
Simplify indexed access types applied to mapped types
2018-12-11 17:56:03 -08:00
Daniel Rosenwasser
2999a1eb47 Merge remote-tracking branch 'origin/master' into numericPropertyAccess 2018-12-11 16:52:23 -08:00
Anders Hejlsberg
0dcaaa5c50 Simplify indexed accesses on mapped types with no depth limit 2018-12-11 15:11:57 -08:00
Daniel Rosenwasser
5ab24ed7e0 Merge pull request #28951 from Microsoft/fixLibToIterableAndES5
Only use 'es2015.iterable' to avoid accidental es2015 feature usage.
2018-12-11 13:29:39 -08:00
Anders Hejlsberg
44116b5241 Simplify indexed accesses on mapped types up to five levels deep 2018-12-11 12:11:07 -08:00
Philip Pesca
e6aa992095 Fix error message when type argument arity is wrong (#28366)
* Fix error message when type argument arity is wrong

* Parenthesize 's' in plurals

* Update baseline

* Update baseline

* Use old error message

* Revert parantheses
2018-12-11 09:54:38 -08:00
Daniel Rosenwasser
28c3663e62 Don't use 'fill' in 'fill'. 2018-12-10 21:20:32 -08:00
Anders Hejlsberg
c5c4908ab6 Merge pull request #28948 from Microsoft/discriminatedUnionIndexSignature
Fix crash related to discriminated unions with index signatures
2018-12-10 17:16:30 -08:00
Daniel Rosenwasser
b99c60a68f Merge pull request #28921 from ajafff/no-set
Avoid uses of ES6 Set, use Array instead
2018-12-10 17:15:19 -08:00
Daniel Rosenwasser
c77fcf217b Merge pull request #28932 from j-oliveras/No-es2015-usages
Change es2015 usages to existing ts functions
2018-12-10 17:11:28 -08:00
Anders Hejlsberg
9479353d5c Fix handling of index signatures in discriminated unions 2018-12-10 16:30:21 -08:00
Daniel Rosenwasser
bc59582c7d Merge pull request #28627 from ajafff/arrow-arguments
ArrowFunction has no own 'arguments'
2018-12-10 11:42:43 -08:00
Daniel Rosenwasser
3e6a666b5e Merge pull request #28919 from a-tarasyuk/feature/28893-allow-trailing-comma-on-tuple-types
feature/28893 allow trailing comma on tuple types
2018-12-10 11:33:33 -08:00
Anders Hejlsberg
a8964cbc60 Type parameter with 'unknown' constraint not assignable to '{}' 2018-12-10 08:59:12 -08:00
Jordi Oliveras Rovira
6a82b0a96b Add newline, bad edit 2018-12-09 20:42:02 +01:00
Jordi Oliveras Rovira
3d23e7a0a4 Change usage of String.prototype.startsWith to ts.startsWith. 2018-12-09 20:24:48 +01:00
Jordi Oliveras Rovira
f41b4e088d Change usage of Array.prototype.find to ts.find. 2018-12-09 20:23:56 +01:00
Klaus Meinhardt
67f037ccf4 Avoid uses of ES6 Set, use Array instead
Fixes: #28918
2018-12-08 22:34:47 +01:00
Alexander
94b3d1a2b5 Allow trailing comma on tuple types 2018-12-08 11:53:18 +02:00
Anders Hejlsberg
34d9d4bc8c Merge pull request #28870 from Microsoft/discriminatedUnionInference
Improved type inference for discriminated unions
2018-12-07 15:44:41 -08:00
Josh Goldberg
773c50f05a Better error message for invalid bigint literals ending with n
Helps with the cases of decimals and exponentials, though not with numbers incorrectly starting with `0`.

Fixes #28887.
2018-12-07 00:40:13 -08:00
Daniel Rosenwasser
6fcc815aa8 Check if the expression had any trailing comments. 2018-12-06 18:06:59 -08:00
Daniel Rosenwasser
8150169762 Merge pull request #28857 from JoshuaKGoldberg/identifiers-after-numeric-literals
Added error for IdentifierStart immediately after a NumericLiteral
2018-12-06 11:49:56 -08:00
Josh Goldberg
a211184347 Clarified error message; extended error to identifier end
Lengthening the reported error length to include all of the identifier necessitates scanning for all of the identifier. I also reset the `pos` after so other identifier scanning still happens.
2018-12-06 11:17:06 -08:00
Anders Hejlsberg
676d8af43a Only infer from constituents with matching discriminants in unions 2018-12-05 11:46:06 -08:00
Anders Hejlsberg
07dbc56208 Merge pull request #28854 from Microsoft/fixExcessPropertyChecks
Improve excess property checks
2018-12-05 08:51:08 -08:00
Wesley Wigham
2109c34a8c Merge pull request #28856 from weswigham/showConfig-exhaustive-test
Fix paths showConfig, exhaustively test showConfig
2018-12-04 23:19:35 -08:00
Josh Goldberg
51d10ee4a0 Removed excess new check 2018-12-04 18:29:58 -08:00
Josh Goldberg
174816fc26 Added error for IdentifierStart immediately after a NumericLiteral
Fixes #4702.
2018-12-04 17:59:20 -08:00
Wesley Wigham
86ec885c33 Merge pull request #28772 from r7kamura/feature/tsconfig-newline
Add terminating newline to generated tsconfig.json
2018-12-04 16:54:00 -08:00
Wesley Wigham
19de47f2db Fix paths showConfig, exhaustively test showConfig 2018-12-04 16:24:25 -08:00
Anders Hejlsberg
b34c73f7e8 Merge pull request #28851 from Microsoft/deferConditionalTypes
Defer resolution of conditional types with generic check or extends types
2018-12-04 15:48:57 -08:00
Anders Hejlsberg
1d2df84a77 Improve excess property checking logic 2018-12-04 14:50:56 -08:00
Anders Hejlsberg
b032e063cd Resolve conditional type only when check and extends types are non-generic 2018-12-04 13:06:53 -08:00
Nathan Shively-Sanders
24b39f90c9 Skip implicit any suggestions with no codefix (#28822)
The only unsupported one is binding patterns, which aren't supported by the codefix.
The code was a lot faster to write without supporting them, but there's
no real barrier besides that.
2018-12-04 09:17:37 -08:00
Wesley Wigham
2103ed69e6 Merge pull request #28782 from weswigham/global-merge-no-crash
Fix crash on umd and module merge, allow umds to be accessed when merged with a non-UMD symbol
2018-12-03 09:43:04 -08:00