Commit Graph

4055 Commits

Author SHA1 Message Date
Andy
786bacfa3b Fix bug: support non-Identifier previousToken in importFixes (#21650)
* Fix bug: support non-Identifier previousToken in importFixes

* Remove intersection type
2018-02-07 12:33:16 -08:00
Andy
d35d5d0793 Fix bug: Check for both "./" and ".\" (#21730)
* Fix bug: Check for both "./" and ".\"

* Use normalizeSlashes
2018-02-07 10:50:49 -08:00
Priyantha Lankapura
4cfb7a5105 Fix space issue in mapped type formatting (#21712)
* Add the test for mapped type formatting issue

* Fix inconsistent number of spaces within braces when formatting mapped types
2018-02-07 09:23:31 -08:00
Andy
c1b4c5b827 Fix bug in normalizeAndPreserveTrailingSlash: For "./", return "", not "/" (#21704) 2018-02-07 09:07:05 -08:00
Andy
a1ffa9478c Fix ScriptElementKind for path mapping completions (#21695) 2018-02-06 13:42:32 -08:00
Andy
ba1833759f Simplify string literal completions (#21415) 2018-02-06 12:31:34 -08:00
Andy
c4c9a00a9f Support incomplete identifier in JSX initializer completions (#21681) 2018-02-06 11:40:39 -08:00
Andy
cd22ea73d3 Remove leading directory separator from path mapping completion (#21688) 2018-02-06 11:39:09 -08:00
Andy
cde1cd0075 Add top-level completion for path mapping (#21686) 2018-02-06 11:17:06 -08:00
Andy
57a50f4b9d fixInvalidImportSyntax: Preserve comment (#21684) 2018-02-06 10:19:14 -08:00
Andy
044fb53476 Escape quotes in bracketed completions (#21676) 2018-02-06 09:28:03 -08:00
Andy
d6f52c3477 importFixes: Bundle module specifiers with import kinds, and replace ImportCodeActionMap with existing functionality (#20700) 2018-02-06 08:57:32 -08:00
Andy
48c0af5d43 Support testing document highlights with "filesToSearch" (#21640)
* Support testing document highlights with "filesToSearch"

* Fix lint
2018-02-05 14:02:50 -08:00
Andy
d584f4d97b Fix assertion: class reference location may be 'default' keyword instead of class name (#21630)
* Fix assertion: class reference location may be 'default' keyword instead of class name

* Update API baselines
2018-02-05 13:24:08 -08:00
Andy
120af861f7 Fix bug: replacmentSpan for completion shouldn't include property name that doesn't start with completion name (#21587) 2018-02-05 11:20:22 -08:00
Andy
1784e51929 Fix harness getDirectores implementation to not include directory as prefix (#21633) 2018-02-05 11:11:00 -08:00
Andy
14bd0a2d56 Detect and prevent creation of bad Identifier (#21581) 2018-02-05 09:13:38 -08:00
Andy
c03ee9d85d Use helper functions more in documentHighlights (#21336) 2018-02-05 08:57:17 -08:00
Andy
78f217bdd6 Assert exportingModuleSymbol is defined (#21340)
* Assert `exportingModuleSymbol` is defined

* Add assert message

* Add message in both places
2018-02-02 10:49:34 -08:00
Wesley Wigham
a33dae3771 Rework how default vs local name selection is done to be more correct (#21526) 2018-02-01 12:34:25 -08:00
Andy
df15d5b977 Don't treat class name contextToken as a completion list blocker if it is not the previousToken (#21534) 2018-02-01 09:24:57 -08:00
Andrew Casey
ce7d998c49 Merge pull request #21426 from amcasey/AssertsForGH20809
Add asserts upstream from #20809
2018-01-31 10:49:30 -08:00
Andrew Casey
3020f3d2e6 Handle trivia in code fix forgotten-this
Fixes #21433
2018-01-30 13:25:39 -08:00
Andrew Casey
9bc0d33512 Move bug URLs into assert messages 2018-01-26 11:12:34 -08:00
Andrew Casey
8ec36e988d Add asserts upstream from #20809 2018-01-26 10:52:25 -08:00
Andy
cae4bc5e83 Move createTextChange to services/utilities.ts (#21416)
* Move createTextChange to services/utilities.ts

* Use separate functions instead of overloads
2018-01-25 17:48:22 -08:00
Andy
7c4e755eff When applying // @ts-ignore fix as a group, apply to a line only once. (#21413)
* When applying `// @ts-ignore` fix as a group, apply to a line only once.

* Rename line to lineNumber
2018-01-25 13:53:08 -08:00
Andy
dcd3b5e1f7 At <div x=/**/, completion insertText should be wrapped in braces (#21372) 2018-01-25 09:02:20 -08:00
Andy
0b7f6d5911 Fix bug: Support this. completions even when isGlobalCompletion is false (#21330) 2018-01-25 07:42:01 -08:00
Andy
d333d889c1 Test for (and fix) order of import fixes (#21398) 2018-01-24 15:06:52 -08:00
Andrew Casey
08aa2653dd Remove incorrect assert 2018-01-24 12:46:26 -08:00
Andrew Casey
0c763ed5e0 Merge pull request #21370 from amcasey/GH20559
Handle case clause corner cases in extract symbol
2018-01-23 13:33:02 -08:00
Andrew Casey
2f3b06a3cd Handle extraction ranges including case clause expressions
(mostly by rejecting them)

Fixes #20559
2018-01-23 11:09:27 -08:00
Andrew Casey
4f11dd68ab Handle extracting case clause expression as constant 2018-01-23 11:08:45 -08:00
Andy
d4b3bd16c4 Add KeywordCompletionFilters.TypeKeywords (#21364) 2018-01-23 10:57:35 -08:00
Andy
0e46086e7e In getSpecialPropertyExport, add debug failure when symbol parent is not a module (#21347)
* In getSpecialPropertyExport, add debug failure when symbol parent is not a module

* Fix lint
2018-01-23 08:09:15 -08:00
Esakki Raj
92bde084c1 Fix formatting between for and await (#21254)
* Fix issue 21084

* Removed unwanted rules.
2018-01-21 09:45:58 -08:00
Wenlu Wang
d1ff12e0a6 add completion filter for function like body (#21257) 2018-01-19 17:26:58 -08:00
Sheetal Nandi
cc6d18e4db Merge pull request #20234 from Microsoft/builderApi
Api for creating program in watch mode and using builder to get incremental emit/semantic diagnostics
2018-01-19 16:14:50 -08:00
Andy
6224d51f84 For { type: "a" } | { type: "b" }, find references for the union property (#21298) 2018-01-19 16:04:30 -08:00
Sheetal Nandi
8a51cdaf42 Merge branch 'master' into builderApi 2018-01-19 15:56:40 -08:00
Andy
dcfd634559 in goToDefinition, use array helpers and clean up code (#21304)
* in goToDefinition, use array helpers and clean up code

* fix lint
2018-01-19 13:03:53 -08:00
Andy
0a90c67c07 Support testing definition range of a reference gruop (#21302) 2018-01-19 12:15:41 -08:00
Andy
d46653a2ac Handle undefined input to firstDefined (#21300) 2018-01-19 10:10:43 -08:00
Andy
a6c42a63a1 Remove unused properties from interface Refactor (#21286) 2018-01-18 16:39:33 -08:00
Andrew Casey
ebbb3a4dc4 Merge pull request #21158 from amcasey/NewlineConsistency
Handle linebreaks consistently in code fixes and refactorings
2018-01-18 16:02:27 -08:00
Andrew Casey
d97dec8574 Fold newline logic into getNewLineOrDefaultFromHost 2018-01-18 13:56:12 -08:00
Andy
dffa8b1329 Add a TriviaKind type to allow more specific types (#21237) 2018-01-18 09:44:30 -08:00
Andy
801bded31d computeIndentation: Simplify control flow (#21239) 2018-01-18 09:44:00 -08:00
Andrew Casey
50fd476233 Make SymbolContext a subtype of TextChangesContext 2018-01-17 16:16:22 -08:00