5120 Commits

Author SHA1 Message Date
Ron Buckton
3d2af9ff33
Relocate Debug namespace to reduce duplication (#31524) 2019-05-22 11:20:29 -07:00
Sheetal Nandi
00cea41b65 Add sortText depending scope of symbols
Fixes #15024
2019-05-20 15:53:51 -07:00
Andrew Branch
15daf42b2c
Merge pull request #31028 from andrewbranch/feature/smart-select
Smart Select language service API
2019-05-16 09:45:05 -07:00
Daniel Rosenwasser
d484163d0f
Merge pull request #31262 from rpgeeganage/new_keyword_consistent_resolve
Quick info on 'new' keyword should be the same as that of resolved expression
2019-05-15 00:36:38 -07:00
Wenlu Wang
714821fc97 add refactor of extract type (#30562)
* add basically implement

* add rename location and add testcase

* collection type arguments

* disallow infer type

* add support for typedef convert

* refactor info to make type safe

* disallow type pred

* avoid unnecessary branch

* disallow type query

* haha😂

Co-Authored-By: Kingwl <kingwenlu@gmail.com>

* Update src/services/refactors/extractType.ts

Co-Authored-By: Kingwl <kingwenlu@gmail.com>

* Update src/services/refactors/extractType.ts

Co-Authored-By: Kingwl <kingwenlu@gmail.com>

* add more tests

* add template tag support in jsdoc

* add support of type parameters constraint

* add more tests

* merge branch

* add more tests

* refactor and update function name
2019-05-07 08:26:53 -07:00
rpgeeganage
8f209be149 fixed the comments 2019-05-06 21:21:37 +02:00
rpgeeganage
578013b65c modified the service file 2019-05-05 19:01:14 +02:00
Ryan Cavanaugh
a86fa20b02
Don't pass a candidates array to getResolvedSignature (#31203)
Found when investigating #30505
2019-05-01 13:59:55 -07:00
Klaus Meinhardt
5bc8a8dddf JSDocTypeTag.typeExpression is not optional (#30452) 2019-04-30 09:46:32 -07:00
amaksimovich2
5b79b942e8 add action for enabling experimentalDescorators option in user config… (#30484)
* add action for enabling experimentalDescorators option in user config file, change error message for this case #29035

* add missing changes in tests

* Add "experimental decorators" tests for jsconfig file
2019-04-25 14:55:04 -07:00
Andy Hanson
6e4c150d6b When function parameters span multiple lines, make the function span start at the ( (#26907)
* When function parameters span multiple lines, make the function span start at the `(`

* Undo unnecessary change
2019-04-25 10:53:39 -07:00
Andrew Branch
6608349ea2
Merge pull request #31008 from andrewbranch/bug/29358
Support binding patterns in Promise -> async/await refactor
2019-04-24 08:43:15 -07:00
Ryan Cavanaugh
885d4d63c8
Remove "generate types" code (#31075) 2019-04-23 13:51:47 -07:00
Andrew Branch
cd56398a53
Merge pull request #30743 from andrewbranch/bug/30675
Make anonymous function formatting apply to anonymous generators too
2019-04-23 09:35:35 -07:00
Andrew Branch
f0a3d2bf92
Filter out zero-width selections 2019-04-19 09:44:42 -07:00
Andrew Branch
d8936fd290
Rename to be smarter 2019-04-18 16:23:06 -07:00
Andrew Branch
f0f7d82d7a
Remove debug info 2019-04-18 16:05:08 -07:00
Andrew Branch
5479893f00
Skip lone variable declarations 2019-04-18 16:05:08 -07:00
Andrew Branch
fed910fd0c
Add stop for JSDoc comments 2019-04-18 16:05:08 -07:00
Andrew Branch
d73eabd35a
Special rules for binding elements, extend brace/whitespace logic to other kinds of bookended lists 2019-04-18 16:05:08 -07:00
Andrew Branch
74fc84ff84
Snap to nodes directly behind the cursor, create special rules for ParameterNodes 2019-04-18 16:05:07 -07:00
Andrew Branch
4ecdc82736
Solidify fake tree approach 2019-04-18 16:05:07 -07:00
Andrew Branch
fcb7f0152f
Rethink sibling expansion by creating fake subtrees 2019-04-18 16:05:07 -07:00
Andrew Branch
70e2672ab3
Add rules for expanding selection to sibling nodes 2019-04-18 16:05:07 -07:00
Andrew Branch
0f7bc02892
Move to language service 2019-04-18 16:05:06 -07:00
Andrew Branch
af498eb6ca
Clean up synthetic binding name creation and discriminating 2019-04-18 11:50:26 -07:00
Andrew Branch
e7fb18e395
Handle case where you have to add a destructuring after a try/catch block 2019-04-18 11:36:47 -07:00
Andrew Branch
92f0ac7efc
Remove unnecessary change 2019-04-17 18:48:01 -07:00
Andrew Branch
08bb58b0c1
Enable renaming object binding patterns when needed 2019-04-17 18:43:01 -07:00
Andrew Branch
42c9b47add
Fix let/const selection for binding patterns 2019-04-17 18:43:01 -07:00
Andrew Branch
4c73b2e7bd
Basic support for binding patterns in async/await code fix 2019-04-17 18:43:00 -07:00
Adam Postma
e951455215 Update misspelling 'identifer' to 'identifier' (#30894)
* fix typo - identifer to identifier

* fix typo - identifer to identifier
2019-04-12 13:29:00 -07:00
Andrew Branch
45ed0186a1
Make anonymous function formatting apply to anonymous generators too 2019-04-03 17:21:20 -07:00
Sheetal Nandi
17ceddaa1a
Merge pull request #29493 from Kingwl/avoid-quickfix-for-declaration-file
avoid add missing member in declaration file
2019-03-29 11:58:08 -07:00
Gabriela Araujo Britto
bb5eb025a8
Handle imports and exports in 'convert parameters to destructured object' (#30475)
* add test for imported function

* start to implement import references check

* fix imported function test

* skip alias when looking for symbol target

* recognize ES6 imports

* recognize some export syntax

* add tests for imports/exports

* add test for imported function

* start to implement import references check

* fix imported function test

* skip alias when looking for symbol target

* recognize ES6 imports

* recognize some export syntax

* add tests for imports/exports

* add test for imported function

* start to implement import references check

* fix imported function test

* recognize ES6 imports

* recognize some export syntax

* add mode import/export syntax cases

* fix entryToFunctionCall to deal with new calls through property/element access expressions

* add more tests for imports/exports

* allow function and class declarations that have no name but have a default modifier

* rename tests

* fix conflict

* fix tests

* add test for nameless class

* rename function

* minor refactor

* remove old tests

* delete old test

* refactor as suggested

* use getContainingFunctionDeclaration
2019-03-28 13:34:29 -07:00
王文璐
9050d0fdf8 update external files api 2019-03-27 19:06:21 +08:00
王文璐
6bc5ef3474 Merge branch 'master' into avoid-quickfix-for-declaration-file 2019-03-27 18:36:56 +08:00
Gabriela Araujo Britto
0f6f3b79b5
Fix find all references of inherited constructor (#30514)
* recursively look for inherited constructor references

* add test

* remove outdated comment

* add tests

* move function

* improve tests

* minor refactor

* fix convert params refactoring to deal with inherited constructor calls

* simplify refactor test
2019-03-22 15:17:50 -07:00
Sheetal Nandi
800f7a3447
Merge pull request #30414 from Microsoft/jsSyntaxCompletions
Filter ts only keywords from js file completion
2019-03-20 10:38:11 -07:00
Gabriela Araujo Britto
84087d0e0a
Use shorthand property assignment in convert parameters to object (#30468)
* create shorthand property assignment in argument object when possible

* add shorthand property assignment test

* don't offer refactor on jsdoc comment

* add jsdoc test

* improve jsdoc test

* use crlf
2019-03-19 09:28:09 -07:00
Gabriela Britto
10b9051624
Fix convert to named parameters rest parameter tuple (#30286)
* check if rest parameter is of tuple type in isOptionalParameter

* expose isArrayType and isTupleType in checker

* don't offer refactor if rest parameter type is neither array nor tuple type

* add tests for rest parameters

* fix tests for renamed refactor

* remove unnecessary conditional operator
2019-03-18 10:31:38 -07:00
Anders Hejlsberg
d0646a629a
Merge pull request #30084 from dragomirtitian/GH-26563
Improved argument description for parameters originating from tuples
2019-03-18 06:14:52 -10:00
Nathan Shively-Sanders
658798032b
Fix globalThis completions (#30441)
* Fix, but with test not quite right

* Add missing completions to test

* Remove out-of-date comment
2019-03-15 19:10:39 -07:00
Sheetal Nandi
34a7b7bbd8 implements not a keyword in js 2019-03-15 15:21:38 -07:00
Sheetal Nandi
e78f52d246 Add more information when getValidSourceFile cant find the file in question.
Log for #30180
2019-03-15 15:03:45 -07:00
Sheetal Nandi
ad740f226e Duh!! Static is allowed in JS. 2019-03-15 09:07:23 -07:00
Sheetal Nandi
f829f958a2 Filter ts only keywords from js file completion
Fixes #29212
2019-03-14 15:52:50 -07:00
Gabriela Britto
1c8a359914
rename convert to named parameters (#30401) 2019-03-14 13:41:29 -07:00
Gabriela Britto
7824fbc395
Merge pull request #30383 from Microsoft/fixFindAllRefsOfDefaultExport
Fix find all refs of default export
2019-03-14 09:39:06 -07:00
Sheetal Nandi
8b04143675
Merge pull request #30380 from Microsoft/completionsWhileWritingSpread
Fix completions when writing spread expression
2019-03-14 09:38:50 -07:00