Commit Graph

2949 Commits

Author SHA1 Message Date
Andy
d92c26db69 Add test that getEditsForFileRename respects UserPreferences (#25745)
* Add test that getEditsForFileRename respects UserPreferences

* Test quotePreference
2018-07-17 17:05:35 -07:00
Andy
854462d383 Fix formatting at trailing comma (#25706) 2018-07-17 15:21:35 -07:00
Andy
6d8a5f6288 Fix invalid cast: JSDocSignature is not a SignatureDeclaration (#25734) 2018-07-17 13:35:55 -07:00
Andy
89f2af17f0 Avoid using old node in import fix to use namespace import (#25729) 2018-07-17 13:34:56 -07:00
Andy Hanson
1038c76f88 navigationBar: Don't merge unrelated grandchildren 2018-07-16 12:38:38 -07:00
Andy
afdd47c9ce Simplify rules for isControlFlowEndingStatement (#25693) 2018-07-16 11:17:46 -07:00
Andy
3f4412b173 getContainingList: Handle TypeAliasDeclaration (#25614)
* getContainingList: Handle TypeAliasDeclaration

* Handle ClassExpression and InterfaceDeclaration
2018-07-13 10:30:22 -07:00
Andy
27da9eab8d fixUnreachableCode: Don't delete whole block when non-first line is unreachable (#25625) 2018-07-13 09:57:04 -07:00
Andy
88c6ced3c6 indentMultilineCommentOrJsxText: Fix bug when 'parts' is empty (#25645) 2018-07-13 09:56:21 -07:00
Andy
1fb050bcca Don't report unused diagnostics when the unused node has a parse error (#25598)
* Don't report unused diagnostics when the unused node has a parse error

* Update test
2018-07-12 17:24:59 -07:00
Andy
f9764d17f0 fixUnusedIdentifier: Support deleting @template tag (#25597)
* fixUnusedIdentifier: Support deleting @template tag

* Just return createTextRangeFromNode instead of adjusting range
2018-07-12 11:26:17 -07:00
Andy
52486ae362 Improve isPossiblyTypeArgumentPosition (#25043)
* Improve isPossiblyTypeArgumentPosition

* Update API (#24966)

* Handle new Type<Type<

* Add test for `new C < C<`
2018-07-11 11:15:04 -07:00
Andy
19993a5408 When import("foo") has module resolution error, error span should be "foo" (#25569)
* When `import("foo")` has module resolution error, error span should be "foo"

* Update more tests
2018-07-11 10:06:08 -07:00
Andy
990d445bb6 In services, when overload resolution fails, create a union signature (2) (#25100) 2018-07-11 08:54:47 -07:00
Andy
7a79a45aab JSX closing tag completion: Include '>' if not already present (#25551)
* JSX closing tag completion: Include '>' if not already present

* Expand comment
2018-07-10 16:14:57 -07:00
Andy
b6640e9c5d getJsxClosingTagAtPosition: Return a result if parent has same name and is unclosed (#25557) 2018-07-10 14:31:18 -07:00
Andy
1fc1495863 Increase span of unreachable code error (#25388)
* Increase span of unreachable code error

* Add a new diagnostic for each range of unreachable statements

* Update baselines
2018-07-10 11:45:16 -07:00
Andy
72be7156d2 Support completions for unique symbol exported from module (#25537) 2018-07-10 10:47:43 -07:00
Benjamin Lichtman
b5f5513e4a Merge pull request #25329 from uniqueiniquity/jsxFolding
Add outlining spans for JSX elements
2018-07-09 12:36:23 -04:00
Daniel Rosenwasser
fe2baac33f Merge pull request #25422 from Microsoft/actualSignatureHelpTriggers
Actual signature help trigger filtering
2018-07-08 22:09:35 -07:00
Wesley Wigham
831be5d078 Introduce truncation into node builder and symbol display part writer (#24258)
* Introduce truncation into node builder and symbol display part writer

* Change default maxa truncation length to 240

* Fancy truncation + higher hard limit
2018-07-06 14:58:46 -07:00
Andy
64555aa6a9 navigateTo: Collect results from all referenced projects. (#25283)
* navigateTo: Collect results from all referenced projects.

* Don't use project references, just source maps

* Move more code to session

* Test when implementation file is deleted

* Use tsserver tests instead of fourslash tests to ensure session is used

* Support find-all-references

* Restore fourslash tests

* Update emit baselines (added missing newline)

* Support rename

* @weswigham code review

* Don't open/close files

* Avoid growing `toDo` too eagerly

* @sheetalkamat code review

* Also get symlinked projects for originalLocation

* Update API (#24966)

* More @sheetalkamat code review

* Remove unnecessary test

* Update API (#24966)
2018-07-05 15:39:03 -07:00
Mohamed Hegazy
383319ded6 Merge pull request #25423 from Microsoft/defaultExportName
Handle getting name of default export that's an alias
2018-07-05 12:21:53 -07:00
Mohamed Hegazy
8911c19f4f Merge pull request #25313 from github-john-doe/typo
Typo
2018-07-05 11:43:12 -07:00
Andy Hanson
b1e916cae6 Handle getting name of default export that's an alias 2018-07-05 09:03:22 -07:00
Andy
204b70d7af Don't add completions from a discriminated union type when the discriminant doesn't match (#24770)
* Don't add completions from a discriminated union type when the discriminant doesn't match

* Move code to checker

* Update API (#24966)

* Use isTypeIdenticalTo
2018-07-03 17:05:51 -07:00
Daniel Rosenwasser
a3b2237437 Added tests for syntactic context. 2018-07-03 17:05:10 -07:00
Daniel Rosenwasser
53a0f2374a Remove 'name' property which was invalid. 2018-07-03 17:05:10 -07:00
Anders Hejlsberg
eb7ff43f95 Merge pull request #25408 from Microsoft/contextualTupleTypes
Infer tuple types for contextually typed rest parameters
2018-07-03 14:02:48 -10:00
Andy
064ecd449e Support code-fix-all for importFixes (#25137)
* Support code-fix-all for importFixes

* Change description

* Update API (#25283)
2018-07-03 15:19:15 -07:00
Andy
e1a7f8497e Restore NewFileContent type (#25406) 2018-07-03 13:36:45 -07:00
Daniel Rosenwasser
3e38693425 Amend test for comments, other string types. 2018-07-03 13:01:55 -07:00
Sheetal Nandi
95ad71864b Fix the completion when base type is unknown type from unknown namespace
Fixes #25387
2018-07-03 12:35:25 -07:00
Daniel Rosenwasser
dc6653eb74 Renamed test. 2018-07-03 12:19:39 -07:00
Andy
304d45d833 Canonicalize path before calling startsWith (#25364)
* Canonicalize path before calling `startsWith`

* More specific type for sourceDirectory, and add fourslash test

* Update API (#24966)
2018-07-03 11:23:19 -07:00
Daniel Rosenwasser
e13fd0c568 Merge pull request #24915 from Microsoft/triggerSignatureHelpIArdlyKnowSignatureHelp
Trigger characters in signature help
2018-07-02 23:36:57 -07:00
Anders Hejlsberg
17e959407c Fix fourslash tests 2018-07-02 18:14:32 -10:00
Andy
efc1b7df08 More thoroughly test navigateTo (#25239)
* More thoroughly test navigateTo

* Fix #25233 and #25237

* Update API (#24966)
2018-07-02 19:25:27 -07:00
Andy
5c57e14000 goToDefinition: Don't go to jsx constructor signature (#25382) 2018-07-02 17:18:07 -07:00
Andy Hanson
271bbb027c Merge branch 'master' into fixAddMissingMember_all_dedup 2018-07-02 16:06:57 -07:00
Daniel Rosenwasser
159b3dcec0 Accepted baselines and updated fourslash test. 2018-07-02 16:05:07 -07:00
Daniel Rosenwasser
9651c4231e Account for trigger reasons, as implemented by Roslyn. 2018-07-02 16:04:48 -07:00
Daniel Rosenwasser
c046958752 Merge remote-tracking branch 'origin/master' into triggerSignatureHelpIArdlyKnowSignatureHelp 2018-07-02 15:36:41 -07:00
Mohamed Hegazy
956f9d0be2 Merge pull request #25335 from Microsoft/codeFixAddMissingEnumMember_all
Combine code-fix-all for missing class member and missing enum member
2018-07-02 15:14:19 -07:00
Andy Hanson
f3bc891ae9 fixAddMissingMember: Improve deduplication in code-fix-all 2018-07-02 11:26:50 -07:00
Andy
7dc66e916a moduleSpecifiers: specifier from "rootDirs" should be treated as relative (#25369) 2018-07-02 11:14:49 -07:00
Andy
ded446573a ChangeTracker: Combine deleteDeclaration, deleteNode, and deleteNodeInList (#25276)
* ChangeTracker: Combine deleteDeclaration, deleteNode, and deleteNodeInList

* Change name

* Update API (#24966)
2018-06-29 19:53:32 -07:00
Andy Hanson
2fa27ffdf7 Combine code-fix-all for missing class member and missing enum member 2018-06-29 19:39:19 -07:00
Benjamin Lichtman
2c14bf1d59 Add test 2018-06-29 17:12:06 -07:00
Benjamin Lichtman
f0e5056063 Add test 2018-06-29 11:34:58 -07:00