Commit graph

1515 commits

Author SHA1 Message Date
Wesley Wigham
25c3b99f29 Add skip lib check to many tests (#18935)
* Add skip lib check to many tests, do not include unit test duration in profiler duration

* Add a few more skipLibCheck flags

* A few more

* Add more skip lib check flags
2017-10-04 13:14:05 -07:00
Nathan Shively-Sanders
4d8663c378 Merge pull request #18117 from Microsoft/jsdoc-dotdotdot-binds-tighter-than-postfix
Jsdoc ... binds tighter than postfix ?!
2017-10-03 08:45:26 -07:00
Mohamed Hegazy
4221fb6a39 Check for initializer before using it (#18708) 2017-09-22 17:14:22 -07:00
Daniel Rosenwasser
6a34dc953a Added test and accepted baselines. 2017-09-21 02:07:33 -07:00
Andy
0ae42ea3de Allow relative imports of '.js' files when --noImplicitAny is disabled (#18489)
* Allow relative imports of '.js' files when `--noImplicitAny` is disabled

* Update baselines, and don't ignore a diagnostic about missing JSX
2017-09-19 12:42:29 -07:00
Nathan Shively-Sanders
cb8d9d6143 Revert spread-falsy-union/fix spread of primitive
Turns out partialising falsy unions wasn't needed -- I was just
returning the wrong thing when spreading primitives.
2017-09-15 16:11:41 -07:00
Nathan Shively-Sanders
7497d4cb3a Merge branch 'master' into allow-booleans-in-spreads 2017-09-15 10:26:57 -07:00
Nathan Shively-Sanders
f97d5fa11d Update tests with improved spread-falsy-union rules 2017-09-15 10:06:58 -07:00
Nathan Shively-Sanders
b934c8bcbd Merge pull request #18417 from Microsoft/fail-spec-lambda-parsing-on-parameter-initialiser-missing-=
Fail speculative parsing of arrow functions when their parameter initialisers are missing a =
2017-09-14 13:01:51 -07:00
Nathan Shively-Sanders
18653a5c5d Use removeDefinitelyFalsyTypes for building partial type 2017-09-14 11:18:48 -07:00
Anders Hejlsberg
2077835ff7 Merge pull request #18438 from Microsoft/unionIntersectionUnit
Remove empty intersection types in unit types
2017-09-14 18:44:02 +01:00
Nathan Shively-Sanders
d2e2faad5c Update tests and baselines 2017-09-13 15:13:34 -07:00
Nathan Shively-Sanders
d951c14052 Allow all possibly falsy types in spreads
And update tests to reflect that
2017-09-13 14:56:15 -07:00
Nathan Shively-Sanders
9cddd1aca2 Update spread tests for booleans in spread types 2017-09-13 14:06:15 -07:00
Anders Hejlsberg
78f4cbe53c Add tests 2017-09-13 06:37:59 -07:00
Nathan Shively-Sanders
d8ace9ddfb Don't parse param init when = is required but missing
Makes another test case pass that was taking exponential time to parse,
because now it notices that the = is not present and doesn't even try to
parse the initialiser expression.
2017-09-12 14:41:51 -07:00
Nathan Shively-Sanders
4c4316da72 Fail spec parsing lambdas on parameter missing a =
Fail speculative parsing of arrow function expressions whenever it has a
parameter with an initialiser that is missing '='. Ordinarily this is
allowed for better error recovery in the language service, but for
speculative parsing, the errors can compound. When the initialiser is an
error, and when the '=>' is missing (which is also allowed), what is
putatively an arrow function may actually be something else.

For example, `(a / 8) + function ()
{ }` is currently parsed as if someone had intended to write

`(a = /8)+function()/) => { }` but they forgot the `=` of the
initialiser, the `=>` of the lambda, forgot to close the regular
expression, and mistakenly inserted a newline right after the regular
expression.
2017-09-12 14:01:49 -07:00
Anders Hejlsberg
d65a3e1c67 Merge pull request #18363 from Microsoft/fixIntersectionInference
Fix intersection inference
2017-09-11 20:46:43 +01:00
Wesley Wigham
eb80799ef0 Care about esnext where we look for es2015 (#18331)
* Care about esnext where we look for es2015

* Update diagnostic message to be more agnostic
2017-09-09 16:30:06 -07:00
Anders Hejlsberg
9871c04e54 Add tests 2017-09-09 13:06:28 -07:00
Nathan Shively-Sanders
34a8c8423e Merge branch 'master' into jsdoc-dotdotdot-binds-tighter-than-postfix 2017-09-08 08:37:38 -07:00
Nathan Shively-Sanders
7aac67b9b4 Test: parsing of two-line @typedef jsdoc 2017-09-07 16:22:16 -07:00
Nathan Shively-Sanders
a5c2eac2ee Test:disable lookahead in isStartOfParameter 2017-09-06 15:54:14 -07:00
Nathan Shively-Sanders
541920eb31 Merge pull request #18014 from Microsoft/allow-bang+dotdotdot-as-start-of-type
Allow bang+dotdotdot as start of type
2017-09-01 14:26:16 -07:00
Nathan Shively-Sanders
e2d2f448e4 Add postfix [] ! ? type parsing tests 2017-08-30 08:41:34 -07:00
Nathan Shively-Sanders
3e3846dba4 Test jsdoc:... binds tighter than *n* postfix tokens 2017-08-29 13:02:06 -07:00
Nathan Shively-Sanders
197040d3fd Merge branch 'master' into allow-string-enum-in-element-access 2017-08-28 11:00:13 -07:00
Wesley Wigham
643a7e7e33 Call dynamic import transform on expression used by export equal statement (#18028)
* Call dynamic import transform on expression used by export equal statement

* Use Debug.fail
2017-08-24 17:08:57 -07:00
Ron Buckton
4c68b6d7f0 Merge pull request #16686 from Microsoft/fix16467
Improve JavaScript type from constructor imported via require
2017-08-24 17:00:38 -07:00
Nathan Shively-Sanders
d7d69a1622 Test:string enum in element access 2017-08-24 14:06:21 -07:00
Nathan Shively-Sanders
a025192ac0 Test:allow more jsdoc types in type parameter lists 2017-08-24 08:56:20 -07:00
Nathan Shively-Sanders
ca86dc4deb Test:jsdoc nullable syntax legal in type arguments
And update baselines
2017-08-23 15:00:40 -07:00
Arthur Ozga
6b68da1185 Revert "Fix getConstraintOfIndexedAccess" 2017-08-18 11:32:53 -07:00
Nathan Shively-Sanders
1b4f90705f Test getConstraintOfIndexedAccess fixes and update baselines 2017-08-17 12:45:20 -07:00
Nathan Shively-Sanders
146f828919 Merge pull request #17710 from Microsoft/add-readonly-check-to-property-access-of-index-signature
Add readonly check to property access of index signature
2017-08-16 11:16:54 -07:00
Nathan Shively-Sanders
7809398ad4 Indexed-assignment readonly err is not unknownType
Now, in an assignment to an indexed access of a readonly property, the
resulting type is still the property's type. Previously it was
unknownType. This improves error reporting slightly by reporting some
errors that were previously missed.
2017-08-16 10:06:01 -07:00
Nathan Shively-Sanders
a59f77ffb4 Test:type predicate uses correct index to report errors 2017-08-09 15:45:28 -07:00
Yui
39e0cc61a7 Fix 16628: "undefined" exception when name of binding element in binding pattern is empty (#17132)
* Handle the case where binding pattern name element is empty

* Update tests and baselines

* Feedback from PR

* Handle empty binding patterns more generally in emitter

* Dont simply handling fo empty binding patterns and stay spec compliant

* PR feedback
2017-08-09 13:47:44 -07:00
Nathan Shively-Sanders
847d7fe3c8 Merge pull request #17404 from Microsoft/use-type-param-constraints-for-computed-prop-types
Use type parameter constraints for computed property types
2017-08-08 16:29:28 -07:00
Ron Buckton
75c8ecb2f1 Merge pull request #17517 from tinganho/IgnoredCatchParameter
Ignored catch parameter
2017-08-08 16:15:18 -07:00
Nathan Shively-Sanders
e494d73b29 Merge branch 'master' into use-type-param-constraints-for-computed-prop-types 2017-08-08 13:26:24 -07:00
Anders Hejlsberg
467245780d Merge pull request #17455 from Microsoft/mappedTypeFixes
Mapped and indexed access type fixes
2017-08-02 13:36:37 -07:00
Tingan Ho
4f3e13ab8c Typo 2017-08-02 20:55:19 +02:00
Tingan Ho
f9e85ec091 Adds missing test cases 2017-08-02 20:48:31 +02:00
Nathan Shively-Sanders
a0333b55e5 Merge branch 'master' into use-type-param-constraints-for-computed-prop-types 2017-08-02 10:40:16 -07:00
Tingan Ho
192628510f Fixes CR comments 2017-08-02 12:05:10 +02:00
Tingan Ho
81fb3f702a Addresses CR feedback 2017-08-01 22:10:12 +02:00
Tingan Ho
58c8a2c03d adds test for try-catch-finally 2017-07-30 23:27:27 +02:00
Tingan Ho
c65e5a1d13 Removes valid test cases from invalid test case file 2017-07-30 23:27:14 +02:00
Tingan Ho
e349943c07 Add tests 2017-07-30 23:27:01 +02:00