Andy
fc18f08e63
Remove 'indexOf' helper, use 'arr.indexOf()' ( #20194 )
2018-01-08 10:39:52 -08:00
Andy
6f2ba15446
Start linting for double spaces ( #20820 )
...
* Start linting for double spaces
* Code review
* Fix cases that were excluded by countDoubleSpaces
* Remove extraneous closing parenthesis
2018-01-08 08:52:13 -08:00
Daniel Rosenwasser
1041f09c27
Merge pull request #20941 from mariusschulz/stringCompletionsForIndexedAccessTypes
...
Return string completions for indexed access types
2018-01-06 21:07:00 -08:00
Andrew Casey
1957dfef8e
Merge pull request #20991 from amcasey/GH18794
...
Refine extends-to-implements code fix
2018-01-05 17:52:22 -08:00
Andrew Casey
4437476856
Merge pull request #21042 from amcasey/cannotFindModule
...
Make fixCannotFindModule return an empty array if there is no code action
2018-01-05 17:51:49 -08:00
Andy
e35585b938
Fix conflict between formatting rules ( #21038 )
2018-01-05 17:33:29 -08:00
Andrew Casey
47aad0b8fd
Switch to block-bodied lambda
2018-01-05 16:12:12 -08:00
Andrew Casey
ded788e560
Slightly simplify getCodeActions
2018-01-05 14:54:59 -08:00
Andrew Casey
8f5a76d48b
Make fixCannotFindModule return an empty array if there is no code action
2018-01-05 14:24:40 -08:00
Benjamin Lichtman
5bd477e441
Merge pull request #20924 from uniqueiniquity/jsxSpreadAttributeFormatting
...
Jsx spread attribute formatting
2018-01-05 10:27:47 -08:00
Marius Schulz
25c5e57091
Return string completions for indexed access types
2018-01-05 18:14:06 +01:00
Andrew Casey
a961d7aa04
Only replace implements with a comma if the heritage clauses are sensible
2018-01-04 18:05:58 -08:00
Andrew Casey
afae97ce6e
Refine extends-to-implements code fix
...
1. Retain surrounding trivia when swapping the keyword.
2. Insert commas at the full-starts, rather than starts, of existing
keywords when merging with existing implements clauses.
Fixes #18794
2018-01-04 17:55:12 -08:00
Herrington Darkholme
67eabb98bc
fix #20449 , insert space between decorators ( #20491 )
2018-01-04 16:57:27 -08:00
Matt Bierner
12d5063e4c
Add kindModifier to mark if a completion item is for an optional field ( #20839 )
...
* Add kindModifier to mark if a completion item is for an optional field
For #12458
Adds a new KindModifier for completion items to mark when a property is optional. This can be used by editors to either change the item icon or add a `?` to the item text
* Add method test
* Baseline-accept
2018-01-04 16:36:31 -08:00
Benjamin Lichtman
96530719ac
Merge pull request #20912 from uniqueiniquity/jsxFragmentFormatting
...
Fix formatting for JSX fragment tags
2018-01-04 15:27:36 -08:00
Matt Bierner
3f577b8617
Fix quick info for require template string ( #20851 )
...
* Fix quick info for require template string
Fixes #20850
* Add path completions tests
2018-01-04 15:17:40 -08:00
Wenlu Wang
2ea5f58d60
quick fix of indexed access type ( #20956 )
2018-01-04 12:45:16 -08:00
Andy
0427d0a72b
Use 'mapDefined' array helper ( #21006 )
2018-01-04 12:25:00 -08:00
Andy
aab5c262c2
Remove unnecessary existence check ( #21005 )
2018-01-04 12:24:41 -08:00
Andy
db82a5604a
Improve find-all-references for redeclared property in a derived interface ( #21002 )
2018-01-04 10:58:14 -08:00
Andy
7de8c6bcaa
For export default foo, use 'foo' for the completion identifier name, not the module name ( #20987 )
2018-01-03 14:56:59 -08:00
Andy
a33f229d82
Support completions contextual types in more places ( #20768 )
...
* Support completions contextual types in more places
* Adjust formatting
2018-01-03 13:51:33 -08:00
Nathan Shively-Sanders
5539e11b76
Merge pull request #20609 from Microsoft/getRootSymbols
...
Ensure getRootSymbols always works recursively
2018-01-03 09:44:27 -08:00
Andy
74b8160430
In import fixes, use a ".js" extension if other imports do ( #20624 )
...
* In import fixes, use a ".js" extension if other imports do
* Code review
2018-01-03 08:20:53 -08:00
Benjamin Lichtman
3f82034498
Ensure spread attribute formatting options match jsxexpression
2017-12-28 12:43:17 -08:00
Benjamin Lichtman
ec7a667e4b
Update rules to match JSXElement
2017-12-27 14:43:23 -08:00
Andy
813864f021
For import completion, use an existing namespace import ( #20457 )
2017-12-21 11:16:09 -08:00
Andy
a92a594ebe
LanguageServiceShim.getCompletionEntryDetails: Support undefined options ( #20810 )
...
* LanguageServiceShim.getCompletionEntryDetails: Support undefined options
* Fix lint
2017-12-20 07:39:11 -08:00
Daniel Rosenwasser
69e091b40d
Merge pull request #19797 from charlespierce/implements_class_error_message
...
Add new error message when class implements class
2017-12-19 11:39:05 -08:00
Daniel Rosenwasser
89b5d8cb14
Merge pull request #19204 from Kingwl/fix-completions-with-template-literal-type
...
fix completions for string literal types with template string (#19162 )
2017-12-19 11:18:21 -08:00
Andy
60bd262437
Don't treat class name as a completion list blocker if the position comes after it ( #20762 )
2017-12-18 12:41:05 -08:00
Andy
1562a278f8
Don't add completion for method if the this parameter doesn't match ( #20616 )
2017-12-18 11:28:04 -08:00
Andy
2efc92d1dc
Adjust formatting rule priority: Never delete space after case ( #20615 )
2017-12-18 10:54:54 -08:00
Andy
9a62454485
Include static 'this' accesses in references of class ( #20483 )
2017-12-18 10:54:22 -08:00
Andrew Casey
5e2dec7727
Merge pull request #20729 from amcasey/GH19839
...
Refine Extract Local
2017-12-15 16:51:25 -08:00
Wesley Wigham
dd933f4413
Fix get symbol at location to behave correctly for parameter assignments and jsx attributes ( #20706 )
...
* Fix get symbol at location to behave correctly got parameter assignments and jsx attributes
* Handle all those edge cases that weren;t explicitly handled
* Fix part of bug WRT getTypeAtLocation and for loops
* Baseline corrections pursuant to #20710
* Restore jsdoc tag interpretation
* Clean up some code, revert fourslash tests
* Cleanup types used by PR feedback
2017-12-15 15:50:22 -08:00
Andrew Casey
adc3234e46
Don't insert a blank line after extracted locals at the start of the file
2017-12-15 15:49:27 -08:00
Andrew Casey
9efab94dfd
Annotate fewer extracted constants with types
...
Expose `isContextSensitive` from the checker and omit type annotations
for expressions for which it returns false.
2017-12-15 15:11:17 -08:00
Andrew Casey
e9ac87c2d6
Don't insert a blank line after extracted locals
...
Still insert a blank line after extracted properties.
2017-12-15 15:11:16 -08:00
Benjamin Lichtman
26c1a49d59
Merge pull request #20640 from uniqueiniquity/revertToJsDocInclusionList
...
Revert to inclusion list for JsDoc comment completion
2017-12-14 14:37:31 -05:00
Ryan Cavanaugh
f6603cd9f2
Merge pull request #20545 from RyanCavanaugh/codefixOmnibus
...
Omnibus fixes for telemetry-sourced crashes
2017-12-13 12:49:58 -08:00
Andy Hanson
9533c0093d
Merge branch 'master' into getRootSymbols
2017-12-13 12:26:57 -08:00
Andy
8ad4aeece1
Make ChangeTracker#newLineCharacter public, to avoid having to pass newLineCharacter around as a parameter ( #20574 )
...
* Make ChangeTracker#newLineCharacter public, to avoid having to pass newLineCharacter around as a parameter
* Don't require newLineCharacter as input to ChangeTracker methods, and make it private again
2017-12-12 12:23:13 -08:00
Andy
21ff2cd501
Remove unnecessary getFirstChildOfKind helper function ( #20647 )
2017-12-12 11:25:58 -08:00
Charles Pierce
c489dd96f6
Resolve merge conflicts in codeFix
2017-12-11 22:27:56 -08:00
uniqueiniquity
97a573984f
Add type alias declarations to inclusion list docs
2017-12-11 16:15:32 -08:00
uniqueiniquity
03b036b630
Revert "Loosen restrictions on jsdoc completion locations"
...
This reverts commit 612616a1058d7aa9fc181126f83041549bfbe295.
2017-12-11 15:56:31 -08:00
Wesley Wigham
eba15b5990
Preserve literal types in contextual unions ( #19966 )
...
* Cherrypick non-comparability related changes from prolific literals PR
* Renames and other style changes
* Accept changes to new tests
* Exclude the domain root from contextual typing literals except for type variables
* Readd simple preservation fix
* Add huge map test
* Revert changes to widening on destructuring initalizers
* Use tristate for subtype-reduction type
* Rename type and argument
* Move longer-running test to user suite
2017-12-11 18:03:38 -05:00
Andy
b629ff4204
Fix bug: FunctionDeclaration may have missing name ( #20618 )
2017-12-11 09:45:20 -08:00