Commit Graph
4302 Commits
Author SHA1 Message Date
Mohamed Hegazy a8618a79e1 Merge pull request #23358 from joscha/joscha/fix-non-imports-matching
fix: do not match MySymbol.import("mod")
2018-04-16 12:37:53 -07:00
Mohamed Hegazy f0057f9a33 Remove condition 2018-04-16 11:48:04 -07:00
Andy cc6bc763bc Simplify getConvertibleFieldAtPosition (#23315) 2018-04-16 09:30:10 -07:00
Andy a297a28fd5 Use getPossibleSymbolReferenceNodes in one more place (#23378) 2018-04-16 08:27:25 -07:00
Joscha Feth a3311edb4a revert change 2018-04-15 11:30:37 +10:00
Joscha Feth 4dc9db1e70 detect nested non-imports 2018-04-15 11:27:51 +10:00
Joscha Feth c64c1c9395 fix up 2018-04-15 03:30:47 +10:00
Joscha Feth f4fa2eb28e undefined instead of null 2018-04-15 01:51:01 +10:00
Joscha Feth 02b8160b41 store lastToken 2018-04-15 01:23:27 +10:00
Joscha Feth ee429ef2ea use state 2018-04-13 11:39:29 +10:00
Ryan Cavanaugh ff60520460 Merge branch 'master' into referencesDogfood_1 2018-04-12 12:26:10 -07:00
Andy abbb79f972 Combine getTouchingWord and getTouchingPropertyName (#22127) 2018-04-12 11:56:40 -07:00
Andy afcced6839 Simplify tryGetImportOrExportClauseCompletionSymbols (#22961)
* Simplify tryGetImportOrExportClauseCompletionSymbols

* Handle undefined key in arrayToSet
2018-04-12 11:55:21 -07:00
Andy d2dc2e6d48 Don't copy trivia when implementing an interface (#23343)
* Don't copy trivia when implementing an interface

* Use an `includeTrivia` flag instead of a separate function
2018-04-12 11:47:42 -07:00
Andy 05c746b547 generateGetAccessorAndSetAccessor: Share modifier-creating code (#23311) 2018-04-12 11:13:25 -07:00
Andy b363240d05 Simplify registerCodeFIx (#23349) 2018-04-12 09:19:01 -07:00
Andy ff7ef4a25a Add fixName property to CodeFixAction (#23350) 2018-04-12 09:05:30 -07:00
Joscha Feth 4da2e5eda3 fix: do not match MySymbol.import("mod") 2018-04-12 19:31:07 +10:00
Andy edcf087145 Fix bug: isSymbolReferencedInFile should return true for shorthand property assignment (#23314)
* Fix bug: isSymbolReferencedInFile should return true for shorthand property assignment

* Also test for export specifier
2018-04-11 19:01:30 -07:00
Ryan Cavanaugh 0e07d775a1 You have to do this everywhere now! 2018-04-11 16:59:53 -07:00
Andy b0552b089d Don't include "/index" in import from @types even with classic resolution (#23347) 2018-04-11 16:22:10 -07:00
Ryan Cavanaugh df95de3231 Merge branch 'master' into referencesDogfood_1 2018-04-11 16:17:38 -07:00
Ryan Cavanaugh 9a5a5b10a3 Remove all reference comments from services 2018-04-11 15:39:12 -07:00
Andy 28455c65b3 patternMatcher: Return single best match instead of list (#23166) 2018-04-11 15:35:22 -07:00
Andy f6b206a75a When testing references, also test documentHighlights respects filesToSearch (#23306)
* When testing references, also test documentHighlights respects filesToSearch

* Fix handling for redirects and move assertion inside getDocumentHighlights

* Add another assert
2018-04-11 14:07:22 -07:00
Andy fef28665f7 generateGetAccessorAndSetAccessor: Fix typos and use type predicate (#23310) 2018-04-11 13:21:47 -07:00
Andy f479de6d02 patternMatcher: Just return 'undefined' for an invalid pattern (#23237)
* patternMatcher: Just return 'undefined' for an invalid pattern

* Fix tests
2018-04-10 14:38:16 -07:00
Andy 4b706fc479 Add 'disableSuggestions' to UserPreferences (#23283)
* Add 'disableSuggestions' to UserPreferences

* Make mergeMapLikes return a new object

* Avoid additional clone

* mergeMapLikes -> object spread
2018-04-10 11:53:24 -07:00
Wenlu Wang 9c0671d661 add refactor of convert private field to getter and setter (#22143)
* add refactor of convert private field to getter and setter

* fix refactor

* stash

* refactor accessor generate

* revert merge union type

* refeactor and accept baseline

* add support of PropertyAssignment and StringLiteral

* add support for js file

* allow static modifier in js file
2018-04-10 11:51:41 -07:00
Andy ce5d22fef0 Fix bug: don't insert a semicolon when inserting a FunctionDeclaration (#23240) 2018-04-09 15:03:24 -07:00
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