Commit Graph
26450 Commits
Author SHA1 Message Date
Wesley WighamandGitHub d7f03fb0fa Parse generic function types in import type argument lists (#31079)
* Parenthesize in import type node factory

* And now parse unparenthesized generic functions so we can handle parsing the older output
2019-04-23 14:48:31 -07:00
David SherretandRyan Cavanaugh 8fc6640f55 Rename _objectLiteralBrandBrand to _objectLiteralBrand. (#30797) 2019-04-23 14:33:54 -07:00
Wenlu WangandRyan Cavanaugh 27075555c8 fix generate typenode from negative numerical literal (#30610) 2019-04-23 14:20:53 -07:00
Ryan CavanaughandGitHub 885d4d63c8 Remove "generate types" code (#31075) 2019-04-23 13:51:47 -07:00
Wesley WighamandGitHub b47194bfa1 Fix contextual types for a single jsx child (#31040) 2019-04-23 13:51:39 -07:00
Andrii DieievandWesley Wigham 54fa950757 Skip primitive types comparison with array and object types (#31077) 2019-04-23 13:49:32 -07:00
Wesley WighamandGitHub b02b823f03 Track parameter references errors in resolve name rather than secondary pass (#30349) 2019-04-23 13:46:19 -07:00
tkondoandRyan Cavanaugh 84b8ab816c Fix iterable SetConstructor interface (#29777) 2019-04-23 13:27:30 -07:00
Klaus MeinhardtandRyan Cavanaugh 760393f893 fix false positive 'variable is used before being assigned' in destructuring (#29636)
Fixes: #29458
2019-04-23 13:22:37 -07:00
Matt McCutchenandRyan Cavanaugh 6487d1ffe0 Remove the rule that replaces a union of literal types with the base type when comparing equality to a type that isn't a union of literal types. (#27588)
type when comparing equality to a type that isn't a union of literal
types.

The rule is redundant because a primitive type is already directed-
comparable to a value of that primitive type, and it causes errors to be
missed when comparing a type parameter _constrained_ by a union of
literal types to another union of literal types.

The baseline changes look like improvements to me.

Fixes #26758.
2019-04-23 12:59:07 -07:00
Wenlu WangandRyan Cavanaugh bd178746de improve error message when type have same name (#27065)
* improve error message when type have same name

* fix lint and function name

* update test case

* accept baseline
2019-04-23 12:56:03 -07:00
Andrew Branch 7409a04010 Fix merging module augmentations to pattern ambient modules 2019-04-23 12:06:56 -07:00
Andrew BranchandGitHub cd56398a53 Merge pull request #30743 from andrewbranch/bug/30675
Make anonymous function formatting apply to anonymous generators too
2019-04-23 09:35:35 -07:00
Daniel RosenwasserandGitHub c74d25c115 30837 - Bad error message when default 'import'-ing an 'export =' without 'esModuleInterop' (#30847)
30837 - Bad error message when default 'import'-ing an 'export =' without 'esModuleInterop'
2019-04-23 11:23:06 -04:00
Daniel RosenwasserandGitHub 6427711f99 Better erreor messages for properties mis-handled as shorthand property declarations (#31039)
Better erreor messages for properties mis-handled as shorthand property declarations
2019-04-22 16:14:21 -04:00
Wesley WighamandGitHub 7a3e68fc5c Only return the substitute in substitution instantiation when assignability fails (rather than subtype) (#31027)
* Only return the substitute in substitution instantiation when assignability fails (rather than subtype)

* Add test from issue
2019-04-19 16:02:11 -07:00
Wesley WighamandGitHub 40a2eb2b4b Unify couldContainTypeVariables and the similar check done during instantiation (#30969)
* Stop symbol based filtering in couldContainTypeVariables

* Unify couldContainTypeVariables and the similar check done during instantiation
2019-04-19 16:01:53 -07:00
Wesley WighamandGitHub 1a4c15fb11 handle generic types in getArrayifiedType (#30606) 2019-04-19 14:32:33 -07:00
karthikkp 181d126b02 diagnostic messages conflicts resolved 2019-04-20 01:38:17 +05:30
Andrew Branch f0a3d2bf92 Filter out zero-width selections 2019-04-19 09:44:42 -07:00
Andrew Branch 95fb694eed Consistify tabs/spaces in test and baselines 2019-04-19 08:58:29 -07:00
Peter Šándor 08bd017db9 JSDoc author tag parsing updates (#17244) 2019-04-19 12:03:33 +02:00
Peter Šándor 00279e9eca Parse unexpected comments after email in author JSDoc tag (#17244) 2019-04-19 11:17:09 +02:00
Peter Šándor ea9d519424 Support email in author JSDoc tag
- fixes #17244
2019-04-19 11:15:39 +02:00
Daniel RosenwasserandGitHub 2eea21636b Merge pull request #29242 from Kingwl/attach_property_to_default_export
add transformer for emit add property to default export
2019-04-18 23:30:48 -04:00
Andrew BranchandGitHub b6a0988052 Merge pull request #30776 from andrewbranch/feature/10178
Add flag to allow access to UMD globals from modules
2019-04-18 18:05:44 -07:00
Andrew Branch 99ace033bf Revert accidental line ending change 2019-04-18 17:23:54 -07:00
Andrew Branch 511cc79642 Revert accidental line break added 2019-04-18 17:21:52 -07:00
Andrew Branch 12492a369e Rename test to match 2019-04-18 16:28:12 -07:00
Andrew Branch d8936fd290 Rename to be smarter 2019-04-18 16:23:06 -07:00
Andrew Branch f0f7d82d7a Remove debug info 2019-04-18 16:05:08 -07:00
Andrew Branch 5479893f00 Skip lone variable declarations 2019-04-18 16:05:08 -07:00
Andrew Branch fed910fd0c Add stop for JSDoc comments 2019-04-18 16:05:08 -07:00
Andrew Branch d73eabd35a Special rules for binding elements, extend brace/whitespace logic to other kinds of bookended lists 2019-04-18 16:05:08 -07:00
Andrew Branch 74fc84ff84 Snap to nodes directly behind the cursor, create special rules for ParameterNodes 2019-04-18 16:05:07 -07:00
Andrew Branch 4ecdc82736 Solidify fake tree approach 2019-04-18 16:05:07 -07:00
Andrew Branch fcb7f0152f Rethink sibling expansion by creating fake subtrees 2019-04-18 16:05:07 -07:00
Andrew Branch 70e2672ab3 Add rules for expanding selection to sibling nodes 2019-04-18 16:05:07 -07:00
Andrew Branch 0f7bc02892 Move to language service 2019-04-18 16:05:06 -07:00
Andrew Branch 61425cb304 Move most logic to separate file 2019-04-18 16:05:06 -07:00
Andrew Branch 0a4ef0f630 Distinguish between same-line and different-line braces 2019-04-18 16:05:06 -07:00
Andrew Branch 039487c84e Also skip TemplateHeads 2019-04-18 16:05:06 -07:00
Andrew Branch fd88e52252 Start imports 2019-04-18 16:05:06 -07:00
Andrew Branch e62c2333eb Add support for string literals 2019-04-18 16:05:06 -07:00
Andrew Branch f98c00ab9d Add more tests, special handling for mapped types 2019-04-18 16:05:05 -07:00
Andrew Branch af3d0f0248 Start smart select API 2019-04-18 16:05:05 -07:00
Matt BiernerandRyan Cavanaugh 7ccc89b0d7 Check to make sure default npm exists at path before trying to use it (#30910)
* Check to make sure default npm exists at path before trying to use it

**Bug**
If the typings installer is run under a copy of node that does not include npm—but on a machine that does have npm installed—it will incorrectly try to use the npm that does not exist next to its running version of node

**Fix**
Make sure that we check that npm we select exists before trying to use it as the default. Otherwise, fall back to using plain old `npm`

* Add command line flag to gate new behavior

* Fix missing semicolon
2019-04-18 14:24:41 -07:00
Andrew Branch 680d18207c Add tests for destructuring from variable with inferrable type 2019-04-18 12:01:11 -07:00
Andrew Branch af498eb6ca Clean up synthetic binding name creation and discriminating 2019-04-18 11:50:26 -07:00
Andrew Branch e7fb18e395 Handle case where you have to add a destructuring after a try/catch block 2019-04-18 11:36:47 -07:00