Commit Graph

3844 Commits

Author SHA1 Message Date
Alex T
417b8a9481 fix(29881): infer quote preference for property access conversion in completions (#41041) 2020-10-13 10:06:27 -07:00
Andrew Branch
83d02a5f05 Fix auto imports for export default edge cases (#41068) 2020-10-12 15:42:58 -07:00
Alex T
05be3b421a fix: show deprecated error for alias (#40961) 2020-10-12 08:45:08 -07:00
Andrew Branch
4766a2e5a3 Fix overlapping changes when un-qualifying import use site within transformed export (#40987)
* Fix overlapping changes when un-qualifying import use site within transformed export

* Break long line
2020-10-09 13:24:18 -07:00
Alex T
23c5f9260c fix(3758): show completion for object literals in an assignment pattern (#40976) 2020-10-08 12:27:53 -07:00
Nathan Shively-Sanders
cf3e28ea66 Revert "feat(40197): handle uncalled function checks in binary expressions (#40260)"
This reverts commit eaf4f46c17.
2020-10-07 14:14:49 -07:00
Alex T
eaf4f46c17 feat(40197): handle uncalled function checks in binary expressions (#40260) 2020-10-07 14:06:42 -07:00
Wesley Wigham
4dc7e59248 Merge pull request #40953 from weswigham/improve-completions-large-literal-perf
Improve the performance of requesting completions within a massive array literal
2020-10-07 12:44:20 -07:00
Alex T
5c55fc0a21 fix(40817): suggest import for default exported alias (#40845) 2020-10-06 09:52:35 -07:00
Alex T
1e49ad8370 fix(40685): fix generating docs for arrow functions (#40728) 2020-10-06 07:50:08 -07:00
Wesley Wigham
da57f9876e Improve the performance of requesting completions within a massive array literal 2020-10-05 14:42:10 -07:00
Andrew Branch
6ee4a6b7f0 Skip past module.exports = { Foo } in go-to-defintion on 'Foo' (#40835)
* Add test

* Skip shorthand property assignments of module.exports in go-to-definition

* Skip past shorthand property assignments in module.exports in go-to-definition

* Revert WIP change

* Fix comment typo

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-10-05 11:47:19 -07:00
Andrew Branch
736363b427 Use other files when necessary to determine import style in JS (#40879)
* Use other files when necessary to determine import style in JS

* Fix existing tests
2020-10-05 11:39:20 -07:00
Andrew Branch
a301001420 Use correct program when checking for reexports from AutoImportProviderProject (#40843) 2020-09-30 09:32:19 -07:00
Alex T
df33dd593f fix(40441): show deprecated error for deprecated property in namespace (#40605) 2020-09-30 08:26:35 -07:00
Armando Aguirre
f645418833 Merge pull request #40783 from armanio123/FixCommentOnStartLine
Fixed bug with toggleLineComment ends in a start line
2020-09-29 11:43:51 -07:00
Alex T
1e9f42fb16 fix(40609): add tests to cover TemplateLiteralType extraction (#40834) 2020-09-29 11:29:51 -07:00
Alex T
335ed915f1 fix(40609): fix crash for extracting type alias with several type arguments (#40820) 2020-09-28 23:12:15 -07:00
Andrew Branch
3e824f18a8 Don’t offer non-relative non-paths path when baseUrl is undefined (#40813) 2020-09-28 12:06:39 -07:00
Armando Aguirre
8cf980af8d Fixed bug with toggleLineComment ends in a start line 2020-09-25 19:00:02 -07:00
Alex T
73f5f02e97 fix(40756): disable truncation for inferred type (#40764) 2020-09-25 13:01:08 -07:00
Alex T
8e86b24036 feat(40233): add JS Doc types to smart selection (#40338) 2020-09-25 12:36:04 -07:00
Alex T
78830f3be2 fix(40510): add element access expressions support in convertToOptionalChainExpression (#40524) 2020-09-22 18:17:17 -07:00
Andrew Branch
9eb6424b8f Fix indentation of arrow functions returning parenthesized expressions (#40677)
* Fix indentation of arrow functions returning parenthesized expressions

* Add more test cases
2020-09-22 17:16:09 -07:00
Alex T
6c6ddfe5c0 fix(39899): include in NavigationBar default exported call expression arguments (#40412) 2020-09-18 13:06:56 -07:00
Alex T
d779a19053 fix(40432): show as keyword in function context (#40481) 2020-09-17 02:15:48 -07:00
Ron Buckton
dba042d7d5 Add quick fix to add 'void' to Promise resolved without value (#40558)
* Add codefix to add 'void' to Promise resolved without value

* Add specific error message in checker to reduce quick-fix time in editor
2020-09-14 19:12:33 -07:00
Andrew Branch
575baf5c7f Support auto-import from paths alias without baseUrl (#40546) 2020-09-14 15:23:47 -07:00
Alex T
c493d077a3 copy prologue directives to new file (#40306) 2020-09-14 12:24:32 -07:00
Ryan Cavanaugh
ea51fabb7c Don't crash when observing invalid 'export' in object literal (#40295)
Fixes #32870
2020-09-11 17:18:23 -07:00
Alex T
d7cd405bb2 feat(14751): show static members at the top of the list for a class like completion (#40428) 2020-09-11 14:48:24 -07:00
Orta Therox
db5368dc1d Import the semantic highlighter from typescript-vscode-sh-plugin (#39119)
* Initial import of the vscode semantic highlight code

* Adds the ability to test modern semantic classification via strings instead of numbers

* Adds existing tests

* Port over the semantic classification tests

* Update baselines

* Update src/harness/fourslashImpl.ts

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Handle feedback from #39119

* Consistent formatting in the 2020 classifier

* Update baselines

* Apply suggestions from code review

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>

* Update src/harness/fourslashImpl.ts

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>

* Reafactor after comments

* Use 2020 everywhere

* Handle feedback

* WIP - don't provide a breaking change

* Fix all build errors

* Update baselines

* Update src/services/classifier2020.ts

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>

* Addresses Ron's feedback

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-09-11 15:10:55 -04:00
Orta Therox
0a5f53301f Retains trailing cmments in a logical manner in extract type (#40245) 2020-09-10 14:59:46 -04:00
Nathan Shively-Sanders
e350c357d2 Alias for module.exports.x = x (#40228)
* Alias for `module.exports.x = x`

This fixes #40155 in a surprisingly small amount of code.

* Treat any aliasable expression as an alias

* test internal references to exported class
2020-09-10 11:23:48 -07:00
Nathan Shively-Sanders
156cb4c1f9 Fix see tag quickinfo (#40458)
* Add test

* Treat see tags same as param tags
2020-09-10 08:28:38 -07:00
Vincent Boivin
96b0832cf6 fix(40322): bad completions for string literal type as indexed access type object (#40424)
* Added fourslash tests to work on the bug

* fix(40322): bad completions for string literal type as indexed access type object

* Added regression tests

* Using nodes instead of text

* Add verification for parenthesized nodes

* Using range check

* Change test markers
2020-09-09 15:26:35 -07:00
Wenlu Wang
ee5f51bc0f Add see tag support (#39760)
* Add see tag parser

* add baseline

* fix symbol resolve

* add more case

* fix unittests

* improve tests and parser

* accept baseline

* Adopt package-lock.json and npm ci

* Add a workflow to update package-lock.json daily

* Git ignore package-lock.json and forcibly update in workflow

* Update bot email address

* Delete extra npm update

* Update package-lock.json

* Add compactDisplay and signDisplay to NumberFormatOptions (#40039)

* Fix typo in (Readonly)Set.keys comment (fixes #40164) (#40176)

* fix(26325): use a unique name for reserved words in 'constructor like' function name (#39684)

* fix(25770): add diagnostic message for the possible mapped type used as an index (#39973)

* fix(31046): add new diagnostic message for incompatible constructor signature (#40073)

* Update package-lock.json

* Update package-lock.json

* Add rename support

* Accpet baseline

* wip

* fix anders

* Revert "fix anders"

This reverts commit b3178d4618.

* Fix call hierarchy item serialization and server tests (#40348)

* Avoid error

* accept baseline

* Add more tests

* Add signature name resolve

Co-authored-by: Andrew Casey <andrew.casey@microsoft.com>
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
Co-authored-by: Neil Kistner <neil.kistner@gmail.com>
Co-authored-by: cherryblossom000 <31467609+cherryblossom000@users.noreply.github.com>
Co-authored-by: Alexander T <alexander.tarasyuk@outlook.com>
Co-authored-by: Erich Gamma <egamma@microsoft.com>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2020-09-09 10:45:09 -07:00
Alex T
4584d6d470 fix(39676): skip removing unused parameters for functions used as callback references (#40299) 2020-09-09 08:23:53 -07:00
Alex T
6aec7f4676 feat(25770): add Quick Fix to convert LiteralType to MappedType (#40226) 2020-09-08 14:18:53 -07:00
Andrew Branch
f6f2d36ee3 Add optionalReplacementSpan to completions response (#40347)
* Add optionalReplacementRange to completions response

* Get the name right

* Fix unit tests

* Fix comment typo

* Fix comment typo

* Baseline
2020-09-04 13:09:52 -07:00
Alexander T
8384018e68 fix(26141): show completions for string parenthesized types (#39697) 2020-09-04 12:15:16 -07:00
Andrew Branch
8ffb7f083d Reprioritize cross-project module specifier suggestions for auto-import (#40253)
* Add test

* Suggest `paths` module specifiers even when a node_modules path was available

* Fix some tests

* Fix remaining tests

* Add comments
2020-09-03 14:00:06 -07:00
Alexander T
db5f519514 fix(31126): show completions in nested namespace name (#39663) 2020-09-03 13:32:03 -07:00
Alexander T
38cedc5b5f fix(39410): don't remove variables with type definition during converting named export to default (#39505) 2020-09-02 17:00:43 -07:00
Andrew Branch
838a5e6044 Fix call hierarchy item serialization and server tests (#40348) 2020-09-02 11:34:14 -07:00
Andrew Branch
7a0f603b11 Fix extract symbol crash on unterminated literals; don’t offer to extract export = ... (#40272)
* Don’t offer to extract export assignment

* Terminate unterminated literals when extracting them

* Add test with regular expression ending in backslash

* Add test for string literal ending in backslash

* Remove unused parameter default
2020-08-31 14:17:09 -07:00
Andrew Branch
bfb00eb164 Fix misplaced comma in auto imported specifier (#40273) 2020-08-31 10:54:53 -07:00
Alexander T
01362a3ac1 feat(part of 40169): add spelling suggestion/quick fix for module/namespace exported members (#40211) 2020-08-29 01:01:06 -07:00
Alexander T
fa5e9807e8 fix(40010): add outlining for comments before variables statements (#40016) 2020-08-27 16:29:05 -07:00
Alexander T
9f3af67929 fix(10019): allow renaming labels (#40064) 2020-08-18 01:04:49 -07:00