Commit Graph
3033 Commits
Author SHA1 Message Date
Wesley WighamandGitHub 8e5dcfbde5 Add try priors as finally lock label andecedents rather than pre finally label antecedents (#29790) 2019-02-06 16:59:26 -08:00
Kagami Sascha RosylightandWesley Wigham 6249b4c704 Remove ES2018 transforms for ES2018 target (#26315)
* rename esnext.ts as es2018.ts

* remove ES2018 transforms for ES2018 target

* change target from esnext to es2018

* rename tests
2019-02-06 15:35:52 -08:00
Daniel RosenwasserandGitHub 4505eea92d Merge pull request #29766 from Microsoft/USE-ALL-THE-ES2015-NAMES-WESLEY-WHAT-IS-SO-HARD-ABOUT-THAT
Expand "set your lib" suggestions to other commonly used ES2015 declarations
2019-02-05 18:31:16 -08:00
Daniel Rosenwasser 341f9cf1d6 Added test. 2019-02-05 18:01:41 -08:00
Ryan CavanaughandGitHub eed9db5ec5 Merge pull request #28465 from alangpierce/enforce-const-enum-access-for-isolatedmodules
Change isolatedModules to allow const enum declaration and disallow access
2019-02-05 16:36:58 -08:00
Anders Hejlsberg 0c5471ba5c Add regression test 2019-02-03 15:23:21 -08:00
Alan Pierce 942b020081 Merge remote-tracking branch 'origin/master' into enforce-const-enum-access-for-isolatedmodules 2019-02-01 18:52:22 -08:00
Ryan CavanaughandGitHub f81ea89564 Merge pull request #29136 from ajafff/usedbeforedeclaration-objectspread
property is used before its initialization: check more nodes
2019-02-01 13:46:37 -08:00
Anders HejlsbergandGitHub 607f2ea4de Merge pull request #29478 from Microsoft/fixContextualReturnTypes
Infer contextual types from generic return types
2019-02-01 12:31:08 -08:00
Anders HejlsbergandGitHub 8827bed0e7 Merge pull request #29647 from Microsoft/noConstraintsDuringInference
Only check constraints in final phase of type inference
2019-02-01 10:54:08 -08:00
Anders Hejlsberg c58157573e Add breaking change repros 2019-02-01 10:48:52 -08:00
Anders Hejlsberg fffd77457a Merge branch 'master' into fixContextualReturnTypes
# Conflicts:
#	src/compiler/checker.ts
2019-02-01 10:28:50 -08:00
Ryan CavanaughandGitHub aad609c74f Merge pull request #29298 from ajafff/this-reference-in-parameter
Allow referencing 'this' in parameters of functions in the constructor
2019-01-30 19:13:18 -08:00
Anders HejlsbergandGitHub eb513a2035 Merge pull request #29576 from Microsoft/fixContextuallyTypedParameters
Fix inference for contextually typed parameters with initializers
2019-01-30 15:51:29 -08:00
Anders Hejlsberg caa89cafde Add regression test 2019-01-30 08:45:43 -08:00
Anders Hejlsberg 45af34d349 Add subtype reduction complexity limit test 2019-01-28 15:20:32 -08:00
Anders Hejlsberg 7c1bb14c93 Merge branch 'master' into fixContextualReturnTypes 2019-01-26 07:09:14 -08:00
Anders Hejlsberg 25ac1ed262 Merge branch 'master' into fixContextuallyTypedParameters
# Conflicts:
#	src/compiler/checker.ts
2019-01-25 16:43:46 -08:00
Wesley WighamandGitHub 4da9d8bc87 Include index signatures of the source in mapped type template target inferences (#29253) 2019-01-25 15:22:35 -08:00
Alan Pierce a60795f04a Merge remote-tracking branch 'origin/master' into enforce-const-enum-access-for-isolatedmodules
This changes the new error code from TS2739 to TS2748.
2019-01-25 09:19:12 -08:00
Klaus Meinhardt a9653bb5df Merge branch 'master' of github.com:Microsoft/TypeScript into usedbeforedeclaration-objectspread 2019-01-25 15:50:27 +01:00
Klaus Meinhardt d7cb14adbd Merge branch 'master' into usedbeforedeclaration-objectspread 2019-01-25 15:49:14 +01:00
Anders Hejlsberg 1bc4389615 Add tests 2019-01-24 17:07:44 -08:00
Ron Buckton 469ab3fdd0 Merge branch 'master' into fix29006 2019-01-24 16:50:50 -08:00
Ryan CavanaughandGitHub d85c4e551e Merge pull request #27121 from xl1/26977-typedarray
Allow non-number source for TypedArray.from
2019-01-24 13:42:43 -08:00
Anders HejlsbergandGitHub 71d70ef161 Merge pull request #29563 from Microsoft/fixSwitchControlFlow
Fix switch statement control flow logic
2019-01-24 10:36:52 -08:00
Anders Hejlsberg 500c4729e9 Add additional repro 2019-01-24 10:12:35 -08:00
Anders Hejlsberg 83f7f4d190 Add regression test 2019-01-24 09:30:46 -08:00
xiaofa d7601b755f fix trailing comma should not allowed in dynamic import argument 2019-01-24 18:16:34 +08:00
Ron Buckton 60639ce5a8 Replace most instances of getTextOfPropertyName in checker 2019-01-22 14:24:21 -08:00
Anders Hejlsberg cf479fc384 Add regression test for #29168 2019-01-20 08:21:41 -08:00
kingwl e8497096d8 Merge branch 'master' into improve_type_arguments_parser_1 2019-01-20 01:54:49 +08:00
Wesley WighamandGitHub 20285e66e9 Include all flow nodes made within try blocks as antecedents for catch or finally blocks (#29466)
* Include all flow nodes made within `try` blocks as antecedents for `catch` or `finally` blocks

* Fix typo
2019-01-18 14:43:31 -08:00
Anders Hejlsberg 4163d2dee4 Add tests 2019-01-17 17:16:52 -08:00
Wesley WighamandGitHub addeff325b Make the relationship between partial mapped types and the empty object not apply for subtype relationship (#29384) 2019-01-17 15:42:58 -08:00
Wesley WighamandGitHub b6ae492009 Add missing arity check on second inference pass (#29386) 2019-01-17 15:21:17 -08:00
Wesley WighamandGitHub 49689894d7 Elaborate jsx children elementwise (#29264)
* Heavy WIP, but has good contextual typing fix

* Add arity error, refine messages and spans

* Small error message change

* Better error messages, text-specific message
2019-01-15 11:32:36 -08:00
Ron Buckton 208148d05c Fix crash in getTextOfPropertyName 2019-01-14 17:47:52 -08:00
Wesley WighamandGitHub dc0f4afe5e Save & recalculate declare flag modifier on late printed statements (#29412)
* Save & recalculate declre flag modifier on late printed statements

* Accept related baseline updates
2019-01-14 13:53:04 -08:00
Sheetal NandiandGitHub d4055a3234 Merge pull request #26017 from ajafff/rest-param-destructuring
allow BindingPattern in FunctionRestParameter
2019-01-14 10:58:19 -08:00
Wesley WighamandGitHub aba0b700b6 Allow circular umd-merged-with-augmentation refs to resolve to the module as intended (#29335) 2019-01-10 14:48:15 -08:00
Wesley WighamandGitHub 76f444e338 Allow nonnull assertions in references (#29351) 2019-01-10 14:45:19 -08:00
Wesley WighamandGitHub d0aff9bdcd Fix crash (#29333) 2019-01-09 14:23:57 -08:00
Daniel RosenwasserandGitHub 6bfb935929 Merge pull request #25445 from a-tarasyuk/bug/24542-bad-error-message-for-import-ing-an-export
24542 - bad error message for `import *`-ing an `export=`
2019-01-09 11:02:14 -08:00
Klaus MeinhardtandNathan Shively-Sanders b52a7fc3ea Exclude JSDoc @extends from 'super()' checks (#29308)
* Exclude JSDoc @extends from 'super()' checks

This fixes a similar problem as #29244 where JSDoc `@extends`

* fix check 'super can only be referenced in a derived class'
2019-01-09 10:35:22 -08:00
Wesley WighamandGitHub 19c72c758a Allow untyped calls on unions of untyped things (#29265) 2019-01-08 11:05:55 -08:00
Alexander T 52057ac4f6 Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/24542-bad-error-message-for-import-ing-an-export 2019-01-08 10:55:11 +02:00
Klaus Meinhardt 4cd859aa85 Allow referencing 'this' in parameters of functions in the constructor
Fixes: #29286
2019-01-07 22:09:27 +01:00
Martin ProbstandWesley Wigham 7a2b2cebbf Do not emit code for @extends tags in JS. (#29244)
When transpiling JavaScript, TS3.1+ emits `@extends` tags as code. E.g.

    /** @extends {SuperClass} */
    class SubClass {}

Causes an ES5 emit that references SuperClass:

    /**
    * @extends {SomeBase}
    */
    var SubClass = /** @class */ (function (_super) {
        __extends(SubClass, _super);
        function SubClass() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return SubClass;
    }(SomeBase));

Note the literal references to `SomeBase`.

This appears to be an accidental effect of 0f55566cf4. It refactored
`getEffectiveBaseTypeNode` for type checking, but missed an instance
where it is also used for emit logic. This change fixes the problem by
specifically getting the heritage clauses directly off the AST.

Change-Id: I3128a757e5924e2528c61230a90ac13650852542
2019-01-04 08:13:14 -08:00
Klaus Meinhardt 66314e1f85 Merge branch 'master' of github.com:Microsoft/TypeScript into rest-param-destructuring 2019-01-03 17:45:17 +01:00