Commit Graph

4352 Commits

Author SHA1 Message Date
Andy
724e656acb Don't show a definition at a 'require' call (#23822) 2018-05-03 08:02:56 -07:00
Andy
306418e171 fixAddMissingMember: Add a new PropertyDeclaration at the end of the first set (#23837) 2018-05-02 15:42:05 -07:00
Andy
333b8ff028 Fix typo: || should be parenthesized (#23811) 2018-05-01 14:59:58 -07:00
Andy
a1f9a4fb24 fixCannotFindModule: Special handling for node core modules like "fs" (#23807)
* fixCannotFindModule: Special handling for node core modules like "fs"

* Hardcode @types/node
2018-05-01 14:33:42 -07:00
Andy
cee4289f58 Add code fix to convert 'require' in a '.ts' file to an 'import' (#23711)
* Add code fix to convert 'require' in a '.ts' file to an 'import'

* Only add suggestion for modules

* Revert "Only add suggestion for modules"

This reverts commit b1a728fdac.
2018-05-01 09:24:02 -07:00
Mohamed Hegazy
8793b8c56b Merge pull request #23697 from Ken703/bug/23047
Formatting: fix unwanted space between closing parenthesis and string template
2018-04-30 10:19:17 -07:00
Ken703
4e401ca361 update string template rule and test 2018-04-28 19:59:41 -04:00
Andy
bcb5599bf2 Fix typo (#23725) 2018-04-26 16:18:47 -07:00
Andy
aa102435b3 Fix insertNodeAtClassStart for empty class with comment (#23342) 2018-04-26 08:00:38 -07:00
Ken703
d9bc436788 Auto format: no space between closing parenthesis and string template 2018-04-25 21:10:35 -04:00
Andy
cdfd92b90d Don't add import completion from a re-export in "./index" (#23623)
* Don't add import completion from a re-export in "./index"

* Simpler heuristic
2018-04-25 16:15:49 -07:00
Andy
4dc4b8d777 Remove unused property 'referencedDiagnostics' (#23688) 2018-04-25 15:24:36 -07:00
Wesley Wigham
ec05f29632 Make signature help node building cancellable (#23543)
* Make token building cancellable

* Scope cancellation token, make find all refs and quickinfo cancellable

* Make completion entry details cancellable

* Actually accept public API update

* Add test verifying cancellations within checker for select language service operations

* Document runWithCancellationToken a bit more

* Add post-cancellation verification to test
2018-04-25 11:44:13 -07:00
Andy
5280d23b63 importNameCodeFix: consistently put fixes to use existing imports before fixes for existing imports (#23663) 2018-04-25 08:04:20 -07:00
Andy
59765e2d86 goToDefinition: Also add definitions for symbol if it does not match the signature symbol (#23657) 2018-04-24 09:41:47 -07:00
Andy
969aa45ea5 Improve error message for unused type (#23633) 2018-04-24 08:54:42 -07:00
Andy
eca17ac243 Support import fix even when the error is that a type is used as a value (#23655) 2018-04-24 08:54:14 -07:00
Andy
fc30bd10e3 Suggestion to convert to ES6 module should only trigger in projects which express some intent to use ES6 (#23576) 2018-04-23 16:05:37 -07:00
Andy
222f35d927 Make symbol display at ExportSpecifier use 'export', not 'import' (#23629) 2018-04-23 13:29:14 -07:00
Andy
645258cc7d Allow getting import completion details with misspelled name (#23624) 2018-04-23 11:24:51 -07:00
Andy
2e78d1ef21 getEditsForFileRename: Update tsconfig "files" (#23625) 2018-04-23 11:11:06 -07:00
Andy
5c94bef0e1 Add 'renameFile' command to services (#23573)
* Add 'renameFile' command to services

* renameFile -> getEditsForFileRename

* Support `<reference path>` directives
2018-04-20 13:43:09 -07:00
Andy
22f2b118b7 Add 'triggerCharacter' option for completions requests (#23491)
* Add 'triggerCharacter' option for completions requests

* mhegazy code review

* More code review

* Handle '<' in comment
2018-04-20 10:25:58 -07:00
Andy
18c3f5ffa0 Use getFirstConstructorWithBody in one more place, and simplify other class members iteration (#23567) 2018-04-20 09:43:38 -07:00
Andy
a7c08e4691 Make code fix to add 'this.' work for statics (#23527)
* Make code fix to add 'this.' work for statics

* Add 'C.' instead of 'this.'

* DanielRosenwasser code review
2018-04-19 15:39:44 -07:00
Andy
c258d6e1b6 Fix bug: Don't rename 'default' in export { default as x } from "m"; (#23434)
* Fix bug: Don't rename 'default' in `export { default as x } from "m";`

* Rename `foo` in `{ default as foo }` if that's the original export name
2018-04-19 15:35:25 -07:00
Andy
bc7979c174 quickInfo: Get JSDoc tags from aliased symbol (#23526)
* quickInfo: Get JSDoc tags from aliased symbol

* Add test with existing tags
2018-04-19 15:33:36 -07:00
Andy
2f6b59eab9 Misc. improvements to addImplementationReferences (#23507)
* Misc. improvements to addImplementationReferences

* Test typeHavingNode.type === typeNode

* Fix bug: refNode.parent -> refNode
2018-04-18 15:24:19 -07:00
Andy
8f1bdc7e18 findAllReferences: Reduce node.getSourceFile() calls (#23524)
* findAllReferences: Reduce node.getSourceFile() calls

* Don't create extra object
2018-04-18 15:24:02 -07:00
Andy
b271df1639 Simplify getParentSymbolsOfPropertyAccess (#23513) 2018-04-18 12:58:40 -07:00
Andy
f5101e21c3 Find-all-references: Don't crash on 'typeof import' (#23448)
* Find-all-references: Don't crash on 'typeof import'

* Move `| ImportTypeNode` out of `AnyImportOrReExport`
2018-04-17 15:01:36 -07:00
Andy
d1fde3786c Symbol kind for a method on a mapped type should still be 'method' (#23478) 2018-04-17 14:07:59 -07:00
Andy
b00e370605 Add '?' in quick info for optional properties/methods (#23480) 2018-04-17 12:42:23 -07:00
Andy
56d83f9572 Rename pushTypePart to pushSymbolKind (#23481) 2018-04-17 12:41:39 -07:00
Benjamin Lichtman
48f98bdd4d Merge pull request #23452 from uniqueiniquity/normalizeDocumentHighlightsPaths
Normalize document highlights paths
2018-04-17 12:31:00 -07:00
Andy
f6510bd6b9 goToDefinition: Remove isSignatureDeclaration, use isFunctionLike (#23475) 2018-04-17 11:53:41 -07:00
Andy
0c17a2b2a8 goToDefinition: Reduce duplicate code around createDefinitionInfo (#23473)
* goToDefinition: Reduce duplicate code around createDefinitionInfo

* Use '[]' instead of 'emptyArray'

* Remove comment
2018-04-17 11:28:12 -07:00
Andy
d009d8efcf Fix bug: IfStatement#elseStatement can be undefined (#23467) 2018-04-17 10:41:53 -07:00
uniqueiniquity
12f6e5232b Remove unnecessary allocation 2018-04-17 09:41:26 -07:00
uniqueiniquity
3a8d66ba29 Only normalize for purposes of assert 2018-04-17 09:20:34 -07:00
Andy
e50b24a83b convertFunctionToEs6Class: Copy comment from variable declaration (#23445) 2018-04-17 09:15:05 -07:00
Andy
55f9a6ffc2 Fix bug: VariableDeclaration initiazer may be undefined (#23439) 2018-04-17 08:59:07 -07:00
Andy
bc285aa9a1 findAllReferences: Mark *every* search symbol as seen, not just search.symbol (#23451) 2018-04-17 07:53:43 -07:00
Andy
40fd6aebdc Shrink span for convert-to-es6-module suggestion (#23441) 2018-04-16 16:46:27 -07:00
Benjamin Lichtman
221ac50c4c Merge pull request #23437 from Microsoft/getOutliningSpansDepthElseIf
In outliningElementsCollector, treat 'else if' as having same depth as the 'if'
2018-04-16 16:25:57 -07:00
uniqueiniquity
606492b677 Fix lint error and normalization issue 2018-04-16 16:20:12 -07:00
uniqueiniquity
003c0a6743 Move normalization into services 2018-04-16 15:59:22 -07:00
Andy
cae464058a Delete "delete me" files (#23446) 2018-04-16 15:29:02 -07:00
Andy
aac9ef5e51 convertToEs6Module: Avoid replacing entire function (#22507)
* convertToEs6Module: Avoid replacing entire function

* Code review

* Fix typo
2018-04-16 13:16:04 -07:00
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