Commit Graph
14876 Commits
Author SHA1 Message Date
Nathan Shively-Sanders 4ac4d9a940 Cherry-pick 79f1ec32bd
From #38719
2020-05-21 16:53:16 -07:00
TypeScript Bot a076e9ebe2 Bump version to 3.9.3 and LKG 2020-05-19 22:33:09 +00:00
Daniel RosenwasserandGitHub 59d7d00005 Merge pull request #38669 from typescript-bot/pick/38565/release-3.9
🤖 Pick PR #38565 (Perform intersection reduction befo...) into release-3.9
2020-05-19 15:18:21 -07:00
Daniel RosenwasserandGitHub 7225809a36 Merge pull request #38506 from typescript-bot/pick/38500/release-3.9
🤖 Pick PR #38500 (regression(38485): Unable to specif...) into release-3.9
2020-05-19 14:27:31 -07:00
Anders Hejlsbergandtypescript-bot a654a23e46 Cherry-pick PR #38565 into release-3.9
Component commits:
e03cb800d1 Perform intersection reduction before and after getApparentType

7af78d33a0 Add regression tests
2020-05-19 21:22:29 +00:00
8037e26dd4 🤖 Pick PR #38577 (Include unknown in spread prop over...) into release-3.9 (#38581)
* Cherry-pick PR #38577 into release-3.9

Component commits:
e5bccafc29 Include unknown in spread prop override check

* Empty commit

Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
2020-05-14 15:29:33 -07:00
Daniel 01ce953dce Add mising semicolon to '__exportStar'. 2020-05-12 18:12:09 +00:00
Alexander Tandtypescript-bot f185491092 Cherry-pick PR #38500 into release-3.9
Component commits:
ee3f2ce362 regression(38485): allow using rawText property in processing a tagged template
2020-05-12 17:42:47 +00:00
TypeScript Bot 551f0dd9a1 Bump version to 3.9.2 and LKG 2020-05-08 23:44:27 +00:00
Nathan Shively-Sandersandtypescript-bot 7eb4cdedb9 Cherry-pick PR #38270 into release-3.9
Component commits:
9795fa6631 Improve assert message in binder
Looking at the code, I don't think the assert can ever fire, but it
clearly does, or did in the past. This will make it easier for people to
create a repro.

d815effa9b fix lint

add6bbcfce Use BindableStaticNameExpression not BindableStaticAccessExpression
This type does allow identifiers, but those are ruled out earlier, so I added
an assert for that case.
2020-05-08 23:11:51 +00:00
Wesley Wighamandtypescript-bot 623f78e20f Cherry-pick PR #38368 into release-3.9
Component commits:
c827007a38 Fix js missing type arguments on existing nodes and jsdoc object literal declaration emit

128ef9370b Merge branch 'master' into js-declaration-fixes-mk2

a90f97c6f6 Add special lookups test case, rename helper

04e6b6fe92 Accept slightly modified baselines
2020-05-08 07:06:07 +00:00
Daniel RosenwasserandGitHub 659677f6d0 Merge pull request #38364 from typescript-bot/pick/38351/release-3.9
🤖 Pick PR #38351 (Fix regression in name resolution i...) into release-3.9
2020-05-07 23:56:51 -07:00
9edf9ecc4b Cherry-pick PR #38395 into release-3.9 (#38402)
Component commits:
6fe4be21e4 Exclude arrays and tuples from full intersection property check

9019e399e5 Add regression test

Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
2020-05-07 23:56:33 -07:00
d906a471dd Cherry-pick PR #38398 into release-3.9 (#38400)
Component commits:
99c5c096c5 Properly finalize evolving array type in getTypeAtFlowCall

b355cd4da4 Add regression test

Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
2020-05-07 23:50:20 -07:00
Daniel 8f79cd42f4 ESLint suppressions because ain't nobody got time for this. 2020-05-08 00:12:41 +00:00
Daniel 946f4be633 Remove unnecessary casts. 2020-05-07 23:45:00 +00:00
b7d34594ba Properly handle private/protected members in unions of object types (#38277) (#38334)
* Property handle private/protected properties in unions of object types

* Add regression test

Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
2020-05-07 13:18:27 -07:00
Anders Hejlsbergandtypescript-bot 9d6f126c78 Cherry-pick PR #38395 into release-3.9
Component commits:
6fe4be21e4 Exclude arrays and tuples from full intersection property check

9019e399e5 Add regression test
2020-05-07 20:15:20 +00:00
e261cdd2f6 Cherry-pick PR #38228 into release-3.9 (#38350)
Component commits:
956ac2132a Allowed comment directives to be multiline

12749c9291 Added tests, and perhaps fixed a test runner bug?

99bb366fd6 I think it's going to need a consistent variable to loop over

a21477d6ac Used dynamically computed indexes in verifies

992441d9b8 Added multiline tests

199d256ba2 Increased flexibility for multiline comment parsing

65a7587432 Undid a couple of formatting changes; removed backslashes from multiline regexp

036a4ae922 Merge branch 'master'

b620104be2 Merge branch 'master' of https://github.com/microsoft/TypeScript into multiline-comment-directives

Co-authored-by: Orta Therox <orta.therox@gmail.com>
2020-05-06 13:11:45 -07:00
Ron Bucktonandtypescript-bot e6709a4cd4 Cherry-pick PR #38351 into release-3.9
Component commits:
39e68564ff Fix regression in name resolution in parameter
2020-05-06 16:05:17 +00:00
90570dfe09 Cherry-pick PR #38278 into release-3.9 (#38330)
Component commits:
d905cede25 Add missing getApparentType call

c635e43ccc Add regression tests

Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
2020-05-04 17:12:58 -07:00
2c9900f9d1 🤖 Pick PR #38273 (Harden node builder APIs to no long...) into release-3.9 (#38333)
* Cherry-pick PR #38273 into release-3.9

Component commits:
c80c177b44 Harden node builder APIs to no longer return `undefined` for a node when `NodeBuilderFlags.IgnoreErrors` is provided

* Undo API changes for release branch

Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
2020-05-04 16:15:41 -07:00
90f12d6396 Cherry-pick PR #38276 into release-3.9 (#38300)
Component commits:
b664c3dc6b Fix jsdoc variadic type nodes not being remapped to equivalent TS in output

Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
2020-05-04 13:36:02 -07:00
67ca514a7d Cherry-pick PR #38296 into release-3.9 (#38297)
Component commits:
168be30fe1 Fix incorrect line text computation to stop comment directive searching Fixes #38289

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-05-04 13:03:18 -07:00
391a1596be Cherry-pick PR #38272 into release-3.9 (#38274)
Component commits:
d6477f9167 Fix crash on duplicate default exports

Co-authored-by: Andrew Branch <andrew@wheream.io>
2020-04-30 13:46:59 -07:00
f2c93987c2 🤖 Pick PR #38101 (Skip comparing optional property fl...) into release-3.9 (#38199)
* Cherry-pick PR #38101 into release-3.9

Component commits:
f0aeef14bf Skip comparing optional property flag when comparing against discriminant properties

* Update LKG

Co-authored-by: Wesley Wigham <t-weswig@microsoft.com>
Co-authored-by: typescript-bot <typescript@microsoft.com>
2020-04-26 15:30:00 -07:00
TypeScript Bot cefa5f4b05 Bump version to 3.9.1-rc and LKG 2020-04-24 23:47:49 +00:00
Daniel b07ed3322a Merge branch 'master' into release-3.9 2020-04-24 23:33:46 +00:00
Daniel RosenwasserandGitHub 1b8c68d746 Revert "Add check for delete expression must be optional (#37921)" (#38154)
This reverts commit 39beb1d011.
2020-04-24 16:05:18 -07:00
Ryan CavanaughandGitHub 84c83da3a9 Revert #37106 (#38172) 2020-04-24 16:04:33 -07:00
Ron BucktonandGitHub 968943f355 Reset error variable in downlevel for-await-of loop (#38170)
* Rename forAwait tests

* Reset error var in for-await loop
2020-04-24 14:59:41 -07:00
Andrew BranchandGitHub ce95d9ca6b Fix values and types merging in JS module exports (#37896)
* Fix values and types merging in JS module exports

* Fix everything

* Share `setValueDeclaration` between binder (local merge) and checker (cross-file merge)

* Revert accidental changes to baselines

* Update baseline from master merge
2020-04-24 13:49:48 -07:00
Wesley WighamandGitHub 1785d6c707 Special-case export assigned namespaces in getSpecifierForModuleSymbol so they behave like their containing module symbol (#38151) 2020-04-24 13:10:34 -07:00
Andrew BranchandGitHub fe140acc09 Fix truthiness call check for this-property access (#38163) 2020-04-24 13:02:17 -07:00
Ron BucktonandGitHub 38ff7762ec Fix temp variable scoping in async generators (#38121) 2020-04-24 12:10:29 -07:00
Ron BucktonandGitHub a7d6825e25 Fix temp vars referenced in parameter (#38130)
* Fix temp vars referenced in parameter

* Update error message
2020-04-23 20:45:39 -07:00
Wesley WighamandGitHub 815dc90dc5 Issue an error on cross-file merges we cant emit (#38148) 2020-04-23 19:01:16 -07:00
Andrew BranchandGitHub 9569e8aaa4 Fix newline issues when adding multiple imports (#38119)
* Add new import declarations in a single TextChanges call

* Refactor
2020-04-23 11:59:38 -07:00
Nathan Shively-SandersandGitHub 032aa90289 Filter undefined from binding elements with initialisers without undefined in the type (#38122)
* Filter undefined from binding elts w/o undefined-containing inits

* use getTypeOfInitializer instead

* improve comment based on Wesleys suggestion
2020-04-22 15:45:15 -07:00
Nathan Shively-SandersandGitHub f248567dab Filter undefined only in binding patterns in params (#38116)
initialiser. But this is only correct when the initialiser is for a
parameter. For example:

```ts
declare let x: { s: string } | undefined;
const { s } = x;
```

This PR removes undefined from the type of a binding pattern only when
the binding pattern's parent is a parameter. This fixes the regression
from 3.8. However, it's still not the ideal fix; we should be able to
use control flow to solve this problem. Consider:

```ts
const { s }: { s: string } | undefined = { s: 'hi' }
declare function f({ s }: { s: string } | undefined = { s: 'hi' }): void
```

Neither line should have an error, but the first does in 3.8 and after
this change.
2020-04-22 09:56:32 -07:00
Wenlu WangandGitHub 39beb1d011 Add check for delete expression must be optional (#37921)
* Add check for delete expression must be optional

* Add more tests
2020-04-22 03:12:01 -07:00
Andrew BranchandGitHub 7d4fc73331 Fix preserveNewlines printer option when a list child has the same start or end as its parent (#37846)
* Fix preserveNewlines printer option when a list child has the same start or end as its parent

* Fix leading line separator calculation and JSX bug
2020-04-21 15:34:30 -07:00
Wesley WighamandGitHub a72e49e875 Delay pulling on signature contextual type until absolutely needed (#37851) 2020-04-21 13:29:45 -07:00
Wesley WighamandGitHub 136f728bb0 Fix js declaration emit for inherited and this-typed inherited fields (#37970) 2020-04-21 13:13:50 -07:00
Nathan Shively-SandersandGitHub 6ea291a142 Remove superCallShouldBeFirst error (#37947)
* Remove superCallShouldBeFirst error

It seems redundant since TS gives an error on any use of `this` before
super, and non-`this` uses before `super` should be fine.

Fixes #37371

* Revert "Remove superCallShouldBeFirst error"

This reverts commit 3c09153c8a.

* error except for target:"esnext" && useDefineForClassFields
2020-04-21 12:58:37 -07:00
Nathan Shively-SandersandGitHub 63ff6572ae Fix use-before-def with methods on esnext+useDefineForClassFields (#38033)
* Fix use-before-def with methods on esnext+useDefineForClassFields

It was incorrectly flagging methods as used before their definition, but
this is allowed under any emit.

* Add instance function test case
2020-04-21 08:09:25 -07:00
Sheetal NandiandGitHub e7774c6144 Handle non literal computed name when trying to get the name for object literal property name in json object (#37988)
Fixes #37984
2020-04-20 12:58:38 -07:00
Eli BarzilayandGitHub 9c1157a801 fix(37242): add reference to return type for JSDocFunctionType (#37911) 2020-04-20 14:17:03 -04:00
Anders HejlsbergandGitHub 5d78cbdbbd Propagate nonInferrableType in &&, || and ?? operators (#38035)
* Propagate nonInferrableType in &&, || and ?? operators

* Add regression test

* Simpler solution: getTypeFacts(neverType) should return TypeFacts.None
2020-04-20 11:04:24 -07:00
Alexander T a2628c9088 fix(37242): add reference to return type for JSDocFunctionType 2020-04-17 09:05:23 +03:00