Commit Graph

4272 Commits

Author SHA1 Message Date
Andy
e858de9520 Simplify handling of parameter properties in forEachRelatedSymbol (#23213)
* Simplify handling of parameter properties in forEachRelatedSymbol

* Add assert for other paramProps symbol
2018-04-09 13:26:10 -07:00
Andy
98a5e5cc0d Prioritize spelling fix over add-missing-member fix (#23268) 2018-04-09 13:23:11 -07:00
Andy
998beadba2 Support goto-definition for index signatures (#23220)
* Support goto-definition for index signatures

* Use checker.getIndexInfoOfType

* Handle undefined info.declaration
2018-04-09 12:48:41 -07:00
Andy
9762598775 findAllReferences: forEachRelatedSymbol can always include shorthand destructuring (#23223)
* findAllReferences: forEachRelatedSymbol can always include shorthand destructuring

* Update rename tests
2018-04-06 16:30:55 -07:00
Andy
70682b7799 Clean up code for nonrelative path completions (#23150)
* Clean up code for nonrelative path completions

* Remove unnecessary test and simplify based on that

* More code review

* Call getCompletionEntriesFromTypings unconditionally
2018-04-06 12:19:08 -07:00
Andy
2b59c9a0d7 Don't add import completion for re-export with different name (#23211) 2018-04-06 10:05:38 -07:00
Andy
aa8631de98 findAllReferences: Share code between populateSearchSymbolSet and getRelatedSymbol (#23028) 2018-04-05 15:00:14 -07:00
Andy
24842b4002 When --noUnusedLocals/--noUnusedParameters is disabled, add suggestions instead of errors (#22361)
* When --noUnusedLocals/--noUnusedParameters is disabled, add suggestions instead of errors

* Improve performance: do not add unused suggestion diagnostics unless asking for a suggestion

* Add "unused" flag to diagnostics

* Code review

* reportsUnused -> reportsUnnecessary

* Fix test
2018-04-05 12:33:00 -07:00
Andy
f61f12613c findAllReferences: Be consistent how we handle unions in root symobls (#23002) 2018-04-05 10:55:55 -07:00
Andy
7520f9578b Fix bug: <div a="1" b/**/ > is not a jsx initializer (#23138) 2018-04-05 08:30:02 -07:00
Andrew Casey
855171bde5 Introduce a --syntaxOnly server mode
1. Disable the LS in all projects
 2. Don't create Program objects
 3. Ignore config files
2018-04-04 16:44:15 -07:00
Andy
5b928a3d00 patternMatcher: Use helper functions to simplify loops over strings (#23095)
* patternMatcher: Use helper functions to simplify loops over strings

* Fix bug
2018-04-04 08:37:14 -07:00
Andy
4aeb295e3a completions: Properly handle preferences.includeCompletionsWithInsertText (#23092) 2018-04-04 08:36:48 -07:00
Andy
1e227c6d77 Add type predicate helper functions to Type (#23066) 2018-04-04 08:10:09 -07:00
Mohamed Hegazy
db74229a89 Merge pull request #19317 from igelbox/fix-insert-space-after-function-generic
Fixed incorrect insertSpaceBeforeFunctionParenthesis behavior on funtions with type-arguments
2018-04-03 16:11:30 -07:00
Wesley Wigham
c676893dc9 SyntaxKind.ImportTypeNode -> SyntaxKind.ImportType (#23120) 2018-04-03 13:32:03 -07:00
Mohamed Hegazy
84548d5c9b Merge pull request #22049 from Kingwl/spelling-fix
replace element access if suggession is not a valid identifier
2018-04-03 13:29:43 -07:00
Wesley Wigham
a81a645128 Enable member completions for import types (#23085)
* Enable member completions for import types

* Add missing semicolon

* Compact statements

* Ye doth compacteth too much

* Handle class accesibility
2018-04-03 11:53:01 -07:00
王文璐
414266cc32 Merge branch 'master' into spelling-fix 2018-04-03 10:51:40 +08:00
Andy
92dfde0067 matchTextChunk: combine a) and b) cases (#23083) 2018-04-02 18:09:09 -07:00
Andy
1e04bd4168 Support completions for members with symbol names (#23091) 2018-04-02 18:08:00 -07:00
Andy
955542df8e Simplify matchTextChunk (#23081) 2018-04-02 16:20:07 -07:00
Wesley Wigham
fd553df3a6 Path completions for import types (#23082)
* Path completions

* Add missing flag to test

* Minify test, fix lint
2018-04-02 16:15:50 -07:00
Andy
7eaad14bf9 Work around bug with global completion with invalid identifier (#23086) 2018-04-02 14:58:08 -07:00
Andy
8e14ac7d51 Improve string literal completions from a signature (#23062) 2018-04-02 13:01:31 -07:00
Andy
65323e046a Unclosurefy patternMatcher (#23071) 2018-04-02 12:21:48 -07:00
Nathan Shively-Sanders
d3e0929b14 Mark js-assignment functions' symbols as methods (#23078)
This make display more accurate:
1. The functions now print as methods
2. When the type of the function references the class, the type of the
function itself is now printed correctly instead of as `any`.
2018-04-02 12:17:35 -07:00
Andy
72e92a0558 Remove unused properties from patternMatcher (#23076) 2018-04-02 12:02:35 -07:00
Andy
8cdd1aecca Simplify 'bestMatchKind' (#23073) 2018-04-02 11:57:19 -07:00
Andy
d5142a7f45 Don't offer import completions in non-module files unless "--module" is set (#22951)
* Don't offer import completions in non-module files unless "--module" is set

* Even smarter shouldOfferImportCompletions
2018-04-02 10:21:14 -07:00
Andy
ea65f21677 textChanges: Don't crash when inserting type annotation on function with no parens (#23034) 2018-04-02 08:41:22 -07:00
Andy
86a8e269fa Add 'getNameFromPropertyName' helper (#23036) 2018-04-02 08:14:15 -07:00
Arthur Ozga
9dd3ef4205 Merge pull request #22849 from aozgaa/dev/aozgaa/cSharpObjLiteralFormatting
CSharp Style Object Literal Formatting
2018-03-30 15:45:46 -07:00
Andy
e14964169a Combine getDocumentationComment implementations (#22722) 2018-03-30 09:43:12 -07:00
Andy
a5df301dec Simplify getPropertySymbolsFromBaseTypes (#23004) 2018-03-30 09:42:49 -07:00
Mohamed Hegazy
b47c1fd5a1 Merge pull request #22593 from Kingwl/module-spelling-fix
add spelling suggestion support for module
2018-03-29 16:56:43 -07:00
Arthur Ozga
95a69cbeb4 Merge branch 'master' into dev/aozgaa/cSharpObjLiteralFormatting 2018-03-29 16:10:33 -07:00
Wesley Wigham
1e5641ba8e Mangle comment for sorcery (#23006) 2018-03-29 16:05:31 -07:00
Andy
4a39caffd4 Use isExternalModuleImportEquals in one more place (#22417) 2018-03-29 15:40:25 -07:00
Arthur Ozga
5fb5ff7bf3 add option for object literal indent 2018-03-29 15:40:23 -07:00
Andy
d5a7dc1053 fixAddMissingMember: Remove special-casing for 'this' (#22987)
* fixAddMissingMember: Remove special-casing for 'this'

* Update type of 'call'
2018-03-29 12:54:17 -07:00
Andy
7d39b457f8 Simplify createChildren (#22270)
* Simplify createChildren

* Move 'getSourceFile()' call after early returns
2018-03-28 13:57:43 -07:00
Andy
6ec13bb945 Use getAllSuperTypeNodes in more places (#22718) 2018-03-28 13:33:20 -07:00
Andy
e60348be46 Inline isParameterOfConstructorDeclaration (#22838) 2018-03-27 20:15:43 -07:00
Andy
659dc03f68 completions: isNewIdentifierLocation = false for string literal where all legal values are known (#22933) 2018-03-27 19:36:54 -07:00
Andy
6118f211d1 Add 'isParameterPropertyModifier' helper (#22841) 2018-03-27 19:36:42 -07:00
Andy
4f1656035b findAllReferences: Consistently use getTextSpan (#22847)
* findAllReferences: Consistently use getTextSpan

* Remove initializer
2018-03-27 19:36:16 -07:00
Andy
b518120883 findAllReferences: Respect search file set searching for references to an exported symbol (#22657)
* findAllReferences: Respect search file set searching for references to an exported symbol

* Remove debugging code
2018-03-27 18:48:27 -07:00
Andy
3e32e15895 Add 'fixAllDescription' property to CodeFixAction (#22616)
* Add 'fixAllDescription' property to CodeFixAction

* Code review

* Add to protocol

* Make fixAllDescription be just a string
2018-03-27 18:21:21 -07:00
Andy
2cbad6ab06 Support completion details for string literal completions (#22664) 2018-03-27 17:02:04 -07:00