Commit Graph

12512 Commits

Author SHA1 Message Date
Nathan Shively-Sanders 52df34bfab Fix lint 2017-05-10 12:45:56 -07:00
Nathan Shively-Sanders 03bca49794 Correctly emit expression in extends in namespace
Shouldn't have a declare for the emitted temp
2017-05-10 12:45:41 -07:00
Nathan Shively-Sanders 5cd9f4e2dd Unnamed nodes now extend Declaration, not NamedDeclaration 2017-05-10 09:20:17 -07:00
Nathan Shively-Sanders 39f6454f76 Switch to Declaration/NamedDeclaration hierarchy 2017-05-10 09:19:55 -07:00
Nathan Shively-Sanders 42e7852034 Revert "Convert Declaration to union, not type hierarchy"
This reverts commit 573040f0cf.
2017-05-10 09:19:47 -07:00
Nathan Shively-Sanders 6941aebe43 Revert "Fix lint"
This reverts commit b39c319f0c.
2017-05-10 09:19:40 -07:00
Nathan Shively-Sanders b15309251c Revert "Turn ClassElement and TypeElement into unions too"
This reverts commit 22f353ac94.
2017-05-10 09:19:35 -07:00
Nathan Shively-Sanders 10475c717e Turn ClassElement and TypeElement into unions too
Slows down compilation another 3%, so I'm not sure we'll want to take
this change.
2017-05-10 09:19:22 -07:00
Nathan Shively-Sanders 356651e1ca Address comments: simplify, dedupe and clean up 2017-05-10 09:19:16 -07:00
Nathan Shively-Sanders 9983a11429 Fix lint 2017-05-10 09:19:06 -07:00
Nathan Shively-Sanders 949bb27ff1 Convert Declaration to union, not type hierarchy 2017-05-10 09:19:00 -07:00
Nathan Shively-Sanders 0f74294da2 getNameOfDeclaration uniformly, including JS decls
JS-style assignment declarations have a name, but it's not stored on the
name property of the BinaryExpression. This commit adds
`getNameOfDeclaration` to uniformly get the name of a declaration.

It also reworks the declaration of `Declaration` so that accessing
`name` is an error unless the type does *not* include
BinaryExpression.
2017-05-10 09:18:35 -07:00
Yui T 69e35cbca4 Fix linting error 2017-05-08 16:07:20 -07:00
Kanchalai Tanglertsampan e829fa0cc1 Do not error when spread generic type 2017-05-08 16:07:00 -07:00
Yui eda9133c5b Merge pull request #15674 from Microsoft/release-fix15463
[Release] fix15463
2017-05-08 15:11:27 -07:00
Nathan Shively-Sanders 9dafe8b8ad Merge branch 'release-2.3' of https://github.com/Microsoft/TypeScript into release-2.3 2017-05-08 14:13:06 -07:00
Nathan Shively-Sanders b2cfaf8789 Simplify JS check in index constraint error reporting
Any declaration that is a BinaryExpression is a special javascript
declaration, and all JS declarations that are checked for index
constraint compatibility are, in fact, relevant.
2017-05-08 13:37:30 -07:00
Anders Hejlsberg 5c56b4cc13 Optimize signature relationship checks in instantiations of same type 2017-05-08 13:12:45 -07:00
Kanchalai Tanglertsampan d5ae6d183d Refactor "isKnownProperty" to be use outside of checkTypeScriptAssignable as JSX do excess property after 2017-05-08 12:24:23 -07:00
Yui T acf78b718a Wip - remove freshness flag from jsx attributes 2017-05-08 12:24:19 -07:00
Yui T 66b0b4415e Address PR 2017-05-08 12:23:48 -07:00
Kanchalai Tanglertsampan f9dbfd44a9 Allow excess property in spread attributes but also check if any explicitly specified attributes are correct 2017-05-08 12:23:40 -07:00
Yui T 5e3fefda7b Wip-fixing spread type 2017-05-08 12:23:36 -07:00
Nathan Shively-Sanders 428fbbfb50 Address PR comments 2017-05-05 08:57:09 -07:00
Nathan Shively-Sanders a1c92eb8b0 Declare synthetic var for class extends expression
Classes that extend expressions will get a synthetic var declaration for
the expression. This is required for classes that extend an expression
that return an intersection type.
2017-05-05 08:56:56 -07:00
Ron Buckton e3d54c3b47 Add check for tslib __await helper 2017-05-04 14:02:08 -07:00
Ron Buckton a9ad8532d7 __asyncDelegator cleanup 2017-05-04 14:02:07 -07:00
Ron Buckton 3d09bc4734 Switch to __await sentinel, better support for return values 2017-05-04 14:02:06 -07:00
Ron Buckton 2dece3938d Fix over agressive async delegation 2017-05-04 14:02:05 -07:00
Nathan Shively-Sanders a17f16ded8 Add JS declaration to index constraint check error reporting
Now Javascript-style declarations like `this.foo = "bar"` are handled
correctly.
2017-05-04 13:01:26 -07:00
Yui T 1f19fd69b1 Don't stop checking other attributes even though we see spread type. This is so that things are correctly marked as reference and type-checked 2017-05-02 20:54:27 -07:00
Yui 8a306785b4 Merge pull request #15512 from Microsoft/release-2.3_fixDefaultTypeParameter
[React-Release 2.3] Enable default type parameter in React Component class
2017-05-01 19:29:04 -07:00
Andy Hanson 1318e1e3e0 importTracker: Fix error for undefined importClause 2017-05-01 15:34:49 -07:00
Kanchalai Tanglertsampan 28450d5c1e For React Component class, we fill in missing type parameter and instantiate the constructor signature with the new type arguments. 2017-05-01 11:53:13 -07:00
Ron Buckton 8531b7ae9f Do not rename references to class inside of the class body function 2017-05-01 10:43:38 -07:00
Ron Buckton c1103424b8 Fix class name emit in ES5 2017-05-01 10:43:32 -07:00
Nathan Shively-Sanders 69623146bd ES2015 transforms accessors with captured this
Previously, it did not, meaning that the emit for lexically captured
`this` was incorrect.
2017-05-01 10:42:35 -07:00
Mohamed Hegazy 1d209d50e3 Update version 2017-05-01 10:41:44 -07:00
Mohamed Hegazy a28c533612 Update version 2017-04-28 14:25:14 -07:00
Ryan Cavanaugh 9ce6b3560f Add compat overload 2017-04-28 10:13:21 -07:00
Mohamed Hegazy fe0a3071c2 Revert "Treat callback parameters as strictly covariant"
This reverts commit 8ae3e05075.
2017-04-25 14:48:06 -07:00
Mohamed Hegazy 96a3c91122 Revert "Fix callback types to match covariantly"
This reverts commit eebd67f8d5.
2017-04-25 14:47:38 -07:00
Mohamed Hegazy 42d6a9cac6 Revert "Check callback return values bi-variantly"
This reverts commit 189fc51579.
2017-04-25 14:46:55 -07:00
Mohamed Hegazy e86512e270 Revert "Allow callbacks unioned with null and/or undefined"
This reverts commit ec35b800e3.
2017-04-25 14:46:18 -07:00
Mohamed Hegazy 3c3b73e72e Merge branch 'master' into release-2.3 2017-04-24 10:56:29 -07:00
Mohamed Hegazy a0abadbcbe Merge pull request #15320 from Microsoft/fixTypePredicateThisParameter
Fix type predicates with this parameters
2017-04-24 10:44:43 -07:00
Nathan Shively-Sanders 5783435edc Merge pull request #15330 from gcnew/exportConsts
Allow exporting const variables when `strictNullChecks` is on
2017-04-24 10:10:58 -07:00
Mohamed Hegazy bb8a875e71 Merge pull request #15050 from YuichiNukiyama/add_headers_iteratableiterator
Fix Headers interface
2017-04-24 09:27:00 -07:00
Yuichi Nukiyama 2713501298 fix mistake 2017-04-25 00:02:33 +09:00
Yuichi Nukiyama 1fb010e7f8 add Symbol.iterator 2017-04-24 23:42:23 +09:00