Andrew Casey
6dd88b39d5
Merge pull request #21781 from amcasey/TextChangesReplace
...
Tidy up textChanges.replace*
2018-02-09 10:35:20 -08:00
Andy
1b620886a9
Assert getExportEqualsLocalSymbol returns a defined result ( #21831 )
2018-02-09 10:28:31 -08:00
Andrew Casey
f77cefee88
Introduce *WithNodes paralleling textChanges.Replace*
...
1) Take options
2) Return `this`
3) Use adjusted positions
2018-02-08 15:52:12 -08:00
Andrew Casey
80b2c58c51
Eliminate replaceWithSingle in favor of replaceRange
2018-02-08 15:43:46 -08:00
Andrew Casey
8d6e48a2ec
Change the meaning of useNonAdjustedStartPosition
...
Old: getFullStart
New: getStart
Impact: only used in tests
Reason: symmetry with useNonAdjustedEndPosition - both now effectively
mean "exclude trivia from range"
2018-02-08 15:43:41 -08:00
Andy
e2178ecfab
In getSymbolAtLocation, return undefined instead of unknownSymbol ( #21774 )
...
* In getSymbolAtLocation, return undefined instead of unknownSymbol
* Update check in completions to look for undefined instead of unknownSymbol
2018-02-08 14:35:21 -08:00
Andy
16f3b93ffd
Simplify TextSpan creation ( #21306 )
...
* Simplify TextSpan creation
* Rename 'start' to 'pos' where possible
2018-02-08 13:51:10 -08:00
Mohamed Hegazy
4150a463e2
Fix #20805 ( #21755 )
...
* Add `-dev` to version patch number in master
* Refactor to handel non-identifier tokens for UMD modules
* Be more graceful handeling non-identifier tokens in import fixes
* Fix bad merge
* Remove check for isIdentifier
2018-02-08 10:32:08 -08:00
Andy
2a17825428
completions: Add assertions that symbols are defined ( #21764 )
...
* completions: Add assertions that symbols are defined
* Add assertion messages
2018-02-08 10:20:01 -08:00
Andy
05510a8612
Don't use export function for a function whose name differs from its exported name ( #21739 )
...
* Don't use `export function` for a function whose name differs from its exported name
* Fix lint
2018-02-08 09:53:53 -08:00
Priyantha Lankapura
79dde93068
Fix formatting of conditional types ( #21762 )
...
* Add test for formatting of conditional types
* Fix formatting of conditional types
2018-02-08 09:28:38 -08:00
Wesley Wigham
65149063ed
Fix #21641 , Add indirect location for default imports for synthetic defaults ( #21703 )
2018-02-07 15:04:37 -08:00
Andy
ed941c27b8
Don't check modifier legality, highlight anyway ( #21335 )
2018-02-07 13:51:08 -08:00
Sheetal Nandi
01d160e3b6
Merge pull request #21740 from Microsoft/gotoDefinition
...
Fix assert when goToDefinition, from location that is new expression target but not a class symbol
2018-02-07 13:50:02 -08:00
Sheetal Nandi
dab0dbe6f0
Avoid the class declaration not found assert when the new expression doesnt contain construct signature
2018-02-07 13:30:58 -08:00
Sheetal Nandi
35450d3451
Construct signature is valid signature declaration
...
Fixes #21501
2018-02-07 13:29:47 -08:00
Andy
c4362ac4ba
Simplify use of FindAllReferences in inferFromUsage ( #20551 )
2018-02-07 13:25:36 -08:00
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