Commit Graph
26450 Commits
Author SHA1 Message Date
Wesley Wigham e54b796301 Declare dependencies between helpers in the declaritive fashion introduced by #35967 (#37001) 2020-02-25 11:29:59 -08:00
Wesley Wigham e120762390 Remove unneeded branch from getHelperName (#36998) 2020-02-25 11:29:45 -08:00
csigs 5af94fa0ca LEGO: check in for master to temporary branch. 2020-02-25 16:10:24 +00:00
ExE Boss 5e40f32f66 fix(helpers): Use hasOwnProperty.call 2020-02-25 14:13:58 +01:00
Ron Buckton 177713ef45 Switch Debug.assertX functions to use asserts conditions (#36995)
* Switch Debug.assertX functions to use asserts conditions

* Replace assert functions with ts.noop when assertion level too low
2020-02-24 18:20:58 -08:00
Andrew Casey b5bd38bcdc Convert UnionOrIntersectionType.couldContainTypeVariables to ObjectFlags (#36947)
...to save space (and possibly to reduce de-opts, since it appears to be
lazily set).
2020-02-24 18:18:39 -08:00
Andrew Casey 865c1209de Use couldContainTypeVariables to short-circuit instantiateType (#36951)
This is particularly impactful for large unions of string literals.
2020-02-24 17:50:44 -08:00
Nathan Shively-Sanders 3e3df8702c Fix crash on aliased,exported @enum tag in jsdoc (#36996)
THe code to bind `@enum` and `@typedef` didn't handle the case that the
`@enum` was on a property assignment to an alias of module.exports.
Specifically, `x` needs to be correctly aliased to the file's symbol in
the example below:

```
var x = module.exports = {};
/** @enum {string} */
x.E = {
  A: "A"
};
```
2020-02-24 16:13:18 -08:00
Wesley WighamandMichael Rawlings 65e7acce58 Use getters to define live export bindings refresh (#35967)
* use getters to define live export bindings

* fix scoping in export* helper

* Object.defineProperty cannot be used in ES3 target

* Accept changed baselines

* Use function expression, not arrow function

* Update importStarHelper to match export helper in binding-making

* Fix whitespace

* Adjust whitespace in edited helpers

* Use new helper for setting bindings, use unscoped __exportStar helper for exports so helpers get reused more

* Accept updated baselines

* Use __createBinding for individual reexports when target is es3

* Remove unneeded type assertion

* Singeline the helpers

* Add check for createBinding helper, accept updated baselines with shortened helper

Co-authored-by: Michael Rawlings <mirawlings@ebay.com>
2020-02-24 15:36:14 -08:00
csigs 9ec9d94548 LEGO: check in for master to temporary branch. 2020-02-24 22:10:34 +00:00
Ryan Cavanaugh 2b69b2281a Properly handle both special export forms when renaming (#36914)
* Properly handle both special export forms when renaming

Fixes #36713

* Lint
2020-02-24 13:17:02 -08:00
Ron Buckton fd8000dd59 Fix class emit in converted loop body (#36795) 2020-02-24 10:55:13 -08:00
csigs a2bb27cb2c LEGO: check in for master to temporary branch. 2020-02-24 16:10:23 +00:00
c6cdc63b9c sanitize yarn-node path in output (#36953)
* sanitize yarn-node path in output

* Update user baselines (#58)

Co-authored-by: Wesley Wigham <wwigham@gmail.com>

Co-authored-by: TypeScript Bot <ts_bot@rcavanaugh.com>
2020-02-21 16:38:00 -08:00
Wesley Wigham ebca423a6e Add elaboration & quickfix for async-able arrow function (#36342) 2020-02-21 15:51:02 -08:00
Nathan Shively-Sanders 6b645f582b Fix find-refs crash on JSDocNamepath (#36941)
JSDocNamepaths span a lot of identifiers that we don't actually care
about, so it's incorrect for createChildren to add its children as
synthetic nodes.
2020-02-21 15:37:11 -08:00
Klaus Meinhardt 24dd93fc2b Fix access of protected members on generic this-type (#36928)
Fixes: #36926
2020-02-21 09:33:21 -08:00
csigs 4bf28cb133 LEGO: check in for master to temporary branch. 2020-02-21 16:10:25 +00:00
csigs 219f6d7d28 LEGO: check in for master to temporary branch. 2020-02-21 10:10:25 +00:00
Andrew Casey cf24c4fdc0 Fix copy-paste error in navigateToItemIsEqualTo (#36912)
* Fix copy-paste error in navigateToItemIsEqualTo

It was preventing de-duping of items found in multiple projects.

* Add de-duping test
2020-02-20 17:30:50 -08:00
Andrew Branch 4d1a1b850a Expose importModuleSpecifierEnding to protocol (#36725)
* Expose importModuleSpecifierEnding to protocol

* Update API baselines

* Add explicit auto setting
2020-02-20 13:59:56 -08:00
Wesley Wigham 7f02927b78 use const instead of let for new class iife assignments (#36907) 2020-02-20 12:48:02 -08:00
Alexander T bf6be75131 feat(36048): handle uncalled function checks in ternaries (#36402) 2020-02-20 09:29:41 -08:00
Alexander T c8147cb601 fix(33377): use quoteStyle option for string literals completions (#36720) 2020-02-20 08:45:07 -08:00
Nathan Shively-Sanders d76380419d Fix typo in getChangesSinceVersion (#36885) 2020-02-20 08:30:22 -08:00
Wesley Wigham 4a34294908 Unify padding impls and consistently use them 2020-02-19 17:21:51 -08:00
Wesley Wigham 77d3a69039 Fix lint 2020-02-19 17:03:10 -08:00
Wesley Wigham 283bf999df Cast sys.bufferFrom results in cases where global buffer and sys copy of buffer mismatch 2020-02-19 17:02:30 -08:00
Wesley Wigham 5144330c98 Fix implicit dependencies on es6 lib exposed by node changes 2020-02-19 16:43:40 -08:00
Andrew Branch 1236a1006c Fix initialization error when destructuring from object literal that includes a spread assignment (#36865)
* Add test

* Fix superfluous error when destructuring from object that includes spread assignment

* Update baseline to include error case

* Remove redundant check
2020-02-19 08:28:12 -08:00
Jack Bates e50f0aabd2 Include stdout in test worker error messages (#35921) 2020-02-19 06:50:31 -08:00
Alexander T bab0c99584 fix(29565): Add missing super() quickFix errors for constructo… (#36601) 2020-02-18 13:00:31 -08:00
Alexander T bc12123115 fix(29908): Declare static method/property quickfix can add st… (#36854) 2020-02-18 11:27:35 -08:00
Charles 7cc4a8df94 Wrap classes with decorators or static properties in an IIFE, even for ES2015+ (#32011)
* Always wrap classes with decorators or static properties in an IIFE

Currently only script targets less than or equal to ES5 will wrap classes.  However, the wrapping is also crucial to file size optimizations for ES2015+ as well.  Without the IIFE wrapper, minification tools do not elide the class.  This is due to references to the class being present within the downlevelled decorator and static property code.
This change represents the full completion of issue #15857

* Accept new baselines
2020-02-14 16:28:55 -08:00
Andrew Branch a2fe661e19 Import style punditry (#36814) 2020-02-14 15:57:30 -08:00
Andrew Branch b82d3207e8 Fix organizeImports with type-only imports (#36807) 2020-02-14 15:24:39 -08:00
Klaus Meinhardt 9b518c8f53 Exempt ambient private properties from noImplicitAny (#36640) 2020-02-14 15:01:18 -08:00
Alexander T c59fcae117 fix(30003): formatter deletes comments after trailing comma (#36674) 2020-02-14 14:57:18 -08:00
Josh Goldberg 1aaf314678 Marked internal createAnonymousType type as allowing undefined Symbols (#36016) 2020-02-14 14:52:05 -08:00
Andrew Branch b1e706d911 Set correct pos for NamespaceExport (#36794)
* Set correct pos for NamespaceExport

* Update tests
2020-02-14 12:45:26 -08:00
Andrew Branch 950b36192a Fix renaming an ExportSpecifier name when propertyName is present (#36790)
* Fix renaming exportSpecifier name when propertyName is present

* Add baseline test for name without propertyName too
2020-02-13 16:55:52 -08:00
Daniel Rosenwasser 210090b483 No template refactor on plain strings (#36785)
* Add/convert to failing tests.

* Stop offering to convert single string literals to template expressions.

* Ensure we're actually testing for single quotes.
2020-02-13 12:22:53 -08:00
Jack Bates 98492d8daf Add --git-dir and --work-tree to user tests (#35362) 2020-02-12 15:21:29 -08:00
Anders Hejlsberg 7a1c5b7a20 Avoid expensive relationship checking in mapped type member resolution (#36754)
* Avoid expensive relationship checking in mapped type member resolution

* Accept new baselines
2020-02-12 15:05:01 -08:00
Alexander T e435054b3b fix(36416): empty import path causes server crash (#36751) 2020-02-12 14:26:51 -08:00
Jack Bates bf370659b3 Don't npm install the parent project with no args (#35359) 2020-02-12 14:19:46 -08:00
Wesley Wigham 2b64731a97 Fix getTypeAtLocation for as const to not issue a diagnostic (#36741)
* Fix getTypeAtLocation for `as const` to not issue a diagnostic

* use existing helpers for checks

* Fix lint
2020-02-12 13:43:02 -08:00
Ron Buckton 195f6bb2ab Merge branch 'separate-nodetypes' of https://github.com/Swatinem/TypeScript into Swatinem-separate-nodetypes 2020-02-12 11:52:53 -08:00
Nathan Shively-SandersandWesley Wigham 01c86c749d Fix get candidate for overload failure checking (#36744)
* getCandidateForOverloadFailure:call resolveUntypedCall

This re-adds the missed errors and marks as used missed nodes from the
user and RWC baselines.

* Update baselines and remove new test

It was redundant with the old tests

* Defer resolveUntypedCall on resolution failure to give priority to parameter types fixed by overload signatures

Co-authored-by: Wesley Wigham <wwigham@gmail.com>
2020-02-12 11:42:56 -08:00
Ron Buckton cf6b641709 Merge branch 'master' into separate-nodetypes 2020-02-12 11:23:51 -08:00