Commit Graph

3545 Commits

Author SHA1 Message Date
Anders Hejlsberg
601a21c77b Fix signature help 2017-09-02 15:39:14 -07:00
Anders Hejlsberg
b65ff647c1 Improved caching scheme for anonymous types 2017-09-02 10:27:48 -07:00
Matt Bierner
c7b4ed3a91 Fix extract method for anon class expressions (#18168)
Check `scope.name` when trying to extract from an anon class
2017-08-31 13:21:08 -07:00
Andy
601c113d93 Handle indexed access types in getSymbolAtLocation and findAllReferences (#18149)
* Handle indexed access types in getSymbolAtLocation and findAllReferences

* Update baselines, simplify `const objectType`
2017-08-30 14:19:49 -07:00
Andrew Casey
27e590dd5e Merge pull request #18121 from amcasey/WalkerCancel
Allow cancellation during extract method's symbol walking
2017-08-29 17:24:12 -07:00
Andrew Casey
19c3a150e7 Allow cancellation during extract method's symbol walking 2017-08-29 15:38:43 -07:00
Ryan Cavanaugh
fa77e141b0 Merge pull request #17811 from RyanCavanaugh/fix17544
Filter + log undefined elements from the codeActions array
2017-08-29 15:32:44 -07:00
Ryan Cavanaugh
d7b3b6c77d Merge pull request #18120 from RyanCavanaugh/fix457864
Don't crash when a JS file appears in an inferred context
2017-08-29 14:18:47 -07:00
Ryan Cavanaugh
0e2d399c49 Don't crash when a JS file appears in an inferred context 2017-08-29 13:29:56 -07:00
Andrew Casey
a816079dda Add perf comment 2017-08-29 11:24:07 -07:00
Andrew Casey
01d7f0b699 Test that the return type of the extracted method counts as usage 2017-08-29 11:24:05 -07:00
Andrew Casey
30802cda97 Handle loose type parameters in Extract Method
Known limitations:

1. If a type parameter on an inner symbol shadows a type parameter on an
outer symbol, the generated code will be incorrect.  We should either
rename one or more type parameters or forbid the extraction.

2. Type arguments are always passed explicitly, even if they would be
inferred correctly.
2017-08-29 11:10:16 -07:00
Andy
9daa70c47e Revert "Handle indexed access types in getSymbolAtLocation and findAllReferences (#17787)" (#18111)
This reverts commit 30b3cb0f68.
2017-08-29 09:37:27 -07:00
Andy
30b3cb0f68 Handle indexed access types in getSymbolAtLocation and findAllReferences (#17787) 2017-08-29 07:53:22 -07:00
Andy
e73b10a304 Use isPartOfExpression in extractMethod, not isExpression (#18047)
* Use isPartOfExpression in extractMethod, not isExpression

* Add whitespace
2017-08-25 15:15:16 -07:00
Andy
fe1242c8a9 Don't try to extract import to a method (#18025) 2017-08-25 09:53:56 -07:00
Andy
3a0ab74ed6 Test for action description of code actions, and simplify description for extracting method to file (#18030)
* Test for action description of code actions, and simplify description for extracting method to file

* Add unit test file missing from tsconfig.json (only affects gulp) and update tests

* Use the actual number

* Use "module scope" or "global scope" instead of "this file"
2017-08-25 09:53:28 -07:00
Andy
e2141ad469 Mark some arrays as readonly (#17725)
* Mark some arrays as readonly

* Avoid unnecessary allocations and style changes

* Fix lint
2017-08-24 09:55:01 -07:00
Andrew Casey
49676c58f3 Merge pull request #17844 from amcasey/SymbolWalker
Resuscitate the SymbolWalker API
2017-08-23 13:32:21 -07:00
Ryan Cavanaugh
43b8ce664c Merge 2017-08-22 14:31:49 -07:00
Wesley Wigham
053b915061 Rebase SymbolWalker change onto master
From PR #9847.
2017-08-22 11:33:32 -07:00
Basarat Ali Syed
ac098535cb export UsageEntry used by already exported functions 🌹 (#17853) 2017-08-21 16:55:40 -07:00
Andy
5e8e735db5 quickInfo: Don't check for type === undefined, check for any (#17815)
* quickInfo: Don't check for `type === undefined`, check for `any`

* Fixes:
* We still want to do some work even if type is `any`
* Second test for `if (type)` is necessary because it might not have been assigned.
2017-08-18 17:21:25 -07:00
Benjamin Lichtman
45c62ac0a6 Merge pull request #17709 from uniqueiniquity/objectsInArray
Correct outlining spans for object and array literals in array
2017-08-18 16:25:08 -07:00
uniqueiniquity
e6c1afb4a0 Style changes and cleanup 2017-08-18 15:59:22 -07:00
Arthur Ozga
a3d113bed3 Merge pull request #16385 from aozgaa/isInMultiLineComment
multi-line comment formatting fix and handler
2017-08-18 12:43:37 -07:00
Arthur Ozga
e4e969a210 respond to comments 2017-08-17 20:06:46 -07:00
Andy
babb88a0aa Remove duplicate function (#17807) 2017-08-17 06:52:15 -07:00
Daniel Rosenwasser
a38da8af70 Merge pull request #17838 from Microsoft/rev2.6.0
Bump version to 2.6.0.
2017-08-16 23:50:50 -07:00
Arthur Ozga
bc0c9a440e Merge branch 'master' into formattingAfterParseError 2017-08-16 20:27:06 -07:00
Arthur Ozga
6029b5cce8 cleanup 2017-08-16 18:12:28 -07:00
Arthur Ozga
19e2fa6fc5 Merge branch 'master' into isInMultiLineComment 2017-08-16 17:57:04 -07:00
Arthur Ozga
b7bc7d889e clarify JsxText handling 2017-08-16 17:56:20 -07:00
Arthur Ozga
23ca368020 Use simpler indentation for comments
* When in a multi-line comment, we would have liked to use the start of
the comment as a reference point for the indentation inside the comment,
but determining the number of columns shifted for the comment start
woudl require determining the length w/r/t graphemes, which we do not
currently implement. We would like to avoid taking on a runtime
dependency on a grapheme-parsing library.

Instead, we look at the indentation level on the previoud line or start
of the comment as a reference point, and correct shift for lines
starting with an asterisk.
2017-08-16 17:51:29 -07:00
Daniel Rosenwasser
3f50f20d0a Updated version in 'src' as well. 2017-08-16 14:49:44 -07:00
Arthur Ozga
a08d18af57 consolidate isInComment and getRangeOfEnclosingComment 2017-08-15 12:09:43 -07:00
Arthur Ozga
a209db7bb6 dont compute preceding token twice 2017-08-15 12:09:02 -07:00
Arthur Ozga
f3e0cbbd52 findPrecedingToken handles EOF child more gracefully 2017-08-15 12:09:02 -07:00
Arthur Ozga
472ad9d313 findPrevious changes 2017-08-15 12:08:00 -07:00
Arthur Ozga
b2188ad66c cleanup 2017-08-15 12:08:00 -07:00
Ryan Cavanaugh
eb8f7bddc2 Merge pull request #17796 from basarat/patch-1
Fix build 🌹
2017-08-15 11:06:33 -07:00
Ryan Cavanaugh
4fc9831a43 Filter + log undefined elements from the codeActions array 2017-08-15 10:35:15 -07:00
Andy
10c8d5effa In services, show the aliasSymbol for a type even if it's not accessible in the current scope (#17433)
* In services, show the aliasSymbol for a type even if it's not accessible in the current scope

* Rename flag
2017-08-15 10:23:45 -07:00
Basarat Ali Syed
c4dd820564 export interfaces used by exported functions 🌹 2017-08-15 15:19:40 +10:00
Basarat Ali Syed
e7ddaa7d49 export ScopeUsages 🌹 2017-08-15 15:17:19 +10:00
uniqueiniquity
760812f714 Add explanatory comments, consolidate main body 2017-08-14 09:27:45 -07:00
Ron Buckton
09487b8a1d Added tests, pr feedback 2017-08-11 15:31:09 -07:00
Ron Buckton
e3b6df64b3 Add support to infer the quote style for import quick fixes 2017-08-11 14:26:25 -07:00
Yui
d352e3b03f [Master] fix 16407 - LS in binding element of object binding pattern (#16534)
* wip-try get symbol of bindingelement in objectBindingPattern first

* Add fourslash tests

* Update .types baselines

* Update .symbols baselines

* Revert checker changes

* Actually lookup type for binding property name definition

* More succinct check, clarify yui's comment
2017-08-11 11:14:59 -07:00
Ryan Cavanaugh
c27ee81341 Merge branch 'master' into extract-method-2 2017-08-10 17:02:14 -07:00