Commit Graph

2584 Commits

Author SHA1 Message Date
Andy
149803bb12 Fix bug: don't insert a semicolon when inserting a FunctionDeclaration (#23240) (#23289) 2018-04-09 16:24:50 -07:00
Andy
8717a7bcf1 Fix bug: <div a="1" b/**/ > is not a jsx initializer (#23138) (#23167)
* Fix bug: `<div a="1" b/**/ >` is not a jsx initializer (#23138)

* Don't use test feature only available in master branch
2018-04-05 09:17:34 -07:00
Andy
d07102e567 Fix bug: don't return string literal completions if there's no contextual type (#23079) 2018-04-02 16:20:51 -07:00
Sheetal Nandi
4fcf5bc225 Correct the incremental parsing when there is jsDoc node
Fixes #22924
2018-03-28 15:44:01 -07:00
Matt Bierner
8dcbf6961e Fix completions and brace in empty file (#22620)
Fixes #22618
2018-03-28 12:04:03 -07:00
Matt Bierner
dc4001f41d Fix await code action crashes when await is not in a function (#22623)
Fixes #22614
2018-03-28 12:03:27 -07:00
Andy
77e8a69ab2 importFixes: Distinguish when we need to import JSX constructor or JSX namespace (#22828) (#22901) 2018-03-27 17:05:55 -07:00
Andy
c63b206d4f Don't add external module completions in a pure commonjs file (#22583) (#22880) 2018-03-26 16:30:29 -07:00
Andy
cc67601b60 convertFunctionToEs6Class: Copy comments from constructor to class (#22738) (#22802) 2018-03-22 15:15:21 -07:00
Sheetal Nandi
fa2b7ff6b3 Merge pull request #22421 from Microsoft/typesInTypeArguments
Allow types as well as values in possibly type argument location
2018-03-09 14:36:45 -08:00
Sheetal Nandi
ef64cde621 Merge pull request #22409 from Microsoft/symbolKind
Symbol kind needs to use location before falling back to flags
2018-03-09 13:59:38 -08:00
Mohamed Hegazy
c335c3803c Fix #22133: Expose getOutliningSpans on the server protocol (#22400)
* Fix #22133: Expose getOutliningSpans on the server protocol

* Remove debugger statement from test
2018-03-09 08:50:47 -08:00
Andy
0f47c8a205 annotateWithTypeFromJSDoc: Do less special-casing for arrow functions (#22407)
* annotateWithTypeFromJSDoc: Do less special-casing for arrow functions

* Code review
2018-03-08 16:32:32 -08:00
Sheetal Nandi
e1a89e7011 Allow types as well as values in possibly type argument location
Fixes #22369
2018-03-08 16:06:26 -08:00
Sheetal Nandi
ea37c37e88 Symbol kind needs to use location before falling back to flags
Fixes #22366
2018-03-08 11:50:52 -08:00
Andy
a49e83ffa7 annotateWithTypeFromJSDoc: Use changes.insertTypeAnnotation instead of replaceNode (#22404) 2018-03-08 11:47:30 -08:00
Nathan Shively-Sanders
f8134d0b45 Merge branch 'master' into js-object-literal-assignments-as-declarations 2018-03-08 10:40:55 -08:00
Nathan Shively-Sanders
d86440f94f Merge branch 'master' into js-object-literal-assignments-as-declarations 2018-03-07 14:51:55 -08:00
Andy
1f7a5097fa When every import is unused, error on the entire import declaration (#22386)
* When every import is unused, error on the entire import declaration

* Code review

* Store key in map value
2018-03-07 14:42:09 -08:00
Andy
e5804aefde inferFromUsage: use ChangeTracker and typeToTypeNode (#22379)
* inferFromUsage: use ChangeTracker and typeToTypeNode

* Use typeToTypeNode with SymbolTracker

* Add comment
2018-03-07 14:40:50 -08:00
Sheetal Nandi
36b45e3f13 Merge pull request #22343 from Microsoft/codeFixActionNotUndefined
Create the action only if the text change creation is successful.
2018-03-06 12:31:04 -08:00
Mohamed Hegazy
b2dd610e92 Fix ignore message indentation (#22340)
* Update baselines for user tests

* Add explicit indentation

* Fix https://github.com/Microsoft/TypeScript/issues/21355: Format `// @ts-ignore` added by quick fix

* Extract check to a separate function

* Consolidate checking for valid insert location

* Code review comments

* Do not return makeChange
2018-03-06 12:19:19 -08:00
Sheetal Nandi
70944428a1 Create the action only if the text change creation is successful. …
Make change for the infer type from usage could return undefined even if type is present if the type cannot be named
Fixes #22184
2018-03-06 11:03:20 -08:00
Sheetal Nandi
6f6c40186f Add test for undefined action returned
Test for #22343
2018-03-06 11:00:41 -08:00
Andy
a138985448 isValidMethodAccess: Instantiate signature this type if necessary (#21722) 2018-03-06 10:18:06 -08:00
Andy
e5f91f5948 Convert annotateWithTypeFromJSDoc refactor to a codefix (#22336)
* Convert annotateWithTypeFromJSDoc refactor to a codefix

* Compute isJsFile once at top
2018-03-06 07:49:21 -08:00
Priyantha Lankapura
ed1c5d9688 update test for #20577 (#22310) 2018-03-05 16:15:08 -08:00
Andy
4ddf045d6a For <div a= >, after =, do not try to parse an expression (#21373) 2018-03-05 14:38:55 -08:00
Andy
2ac2291b84 Convert use-default-import refactor to a codefix (#22334) 2018-03-05 12:43:01 -08:00
Andy
87c3cca3f0 Make convertFunctionToEs6Class a codefix (#22241)
* Make convertFunctionToEs6Class a codefix

* Change diagnostic message
2018-03-02 12:57:29 -08:00
Andy
dd27288e5a Don't rename static 'this' when renaming class (#22235) 2018-03-02 10:23:08 -08:00
Andy
16fc256823 Convert 'installTypesForPackge' refactor to a suggestion (#22267)
* Convert 'installTypesForPackge' refactor to a suggestion

* Have checker collect a list of suggestion diagnostics instead of redoing work in calculateSuggestionDiagnostics

* Add comment

* Add diagnostic even with `--allowJs`
2018-03-01 14:41:55 -08:00
Andy
c12369b354 Fix bug where findAllReferences included a node outside of sourceFilesToSearch (#22062) 2018-03-01 13:44:53 -08:00
Andy
0a72568e59 findAllReferences: Make definition info independent of search location (#21748) 2018-03-01 12:46:00 -08:00
Andy
6385c66215 Simplify diagnostics fourslash tests (#22245) 2018-03-01 07:34:51 -08:00
Andy
fa4619c5c1 Add 'info' diagnostics (#22204)
* Add 'info' diagnostics

* Code review
2018-02-28 11:16:32 -08:00
Andy
0b1e21794d fourslash diagnostics tests: use objects instead of strings (#22193) 2018-02-26 14:55:26 -08:00
Nathan Shively-Sanders
aa6b76fb6f Merge branch 'master' into js-object-literal-assignments-as-declarations 2018-02-23 09:24:32 -08:00
Wenlu Wang
30a96ba335 add support of codefix for Strict Class Initialization (#21528)
* add support of add undefined type to propertyDeclaration

* add support of add Definite Assignment Assertions to propertyDeclaration

* add support of add Initializer to propertyDeclaration

* remove useless parameter

* fix PropertyDeclaration emit missing exclamationToken

* merge fixes and fix

* fix unnecessary type assert
2018-02-23 07:25:50 -08:00
Andy
8463b1e028 Fix bug: don't call addIndirectUser if we're not tracking indirect users (#22121) 2018-02-22 09:20:59 -08:00
Andy
dda4bd0d0b fixClassDoesnotImplementInheritedAbstractMember: Don't perform fix for same class twice (#22073) 2018-02-21 10:03:02 -08:00
Andy
b00c13b716 Fix bug: Handle QualifiedName in getMeaningFromRightHandSideOfImportEquals (#21779)
* Fix bug: Handle QualifiedName in getMeaningFromRightHandSideOfImportEquals

* Fix lint
2018-02-20 14:32:51 -08:00
Nathan Shively-Sanders
ad43240ff0 Merge branch 'master' into js-object-literal-assignments-as-declarations 2018-02-20 09:14:36 -08:00
Andy
69abe49930 Supports more locations for completions contextual types (#21946) 2018-02-16 16:48:03 -08:00
Sergii Bezliudnyi
b6f82adfed add template to jsdoc completion (#21978) 2018-02-16 16:27:57 -08:00
Andrew Casey
9c2b95dae3 Make FAR handle non-existent imported symbols 2018-02-16 14:49:23 -08:00
Nathan Shively-Sanders
8f98c77217 Merge branch 'master' into js-object-literal-assignments-as-declarations 2018-02-15 10:28:25 -08:00
Andy
2ee92948d8 Support @param tag on property declaration initializer (#21907)
* Support @param tag on property declaration initializer

* Update test

* Finish updating test
2018-02-14 10:12:38 -08:00
Nathan Shively-Sanders
88c67fa777 Refactor binder and update baselines.
Also improve assert message in fourslash.
2018-02-13 15:44:15 -08:00
Andy
8c2756fdf6 Support getting string literal completions based on a type argument constraint (#21168)
* Support getting string literal completions based on a type argument constraint

* Fix bug: look for require call before argument info

* Code review

* @sandersn code review

* Remove test cast

* Reduce completions.ts diff

* @weswigham review

* Remove getTypeArgumentConstraint's dependence on checkTypeArgumentConstraints

* Remove TODO
2018-02-13 15:18:26 -08:00