Commit graph

3853 commits

Author SHA1 Message Date
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
Nathan Shively-Sanders c3d41bbb73
Alias for commonjs require in JS (#39770)
* First attempt at aliases for require

* test+initial support for const x=require

* 1st round of baseline improvements

* 2nd round of baseline updates

* support property access after require

* check @type tag on require

* forbid expando missing namespaces on aliases

taken from #39558 as soon as it was created

* accept error baselines that are good, actually

* Scribbling on d.ts emit code

* use getSpecifierForModuleSymbol

* hideous hack for module.exports of aliases

* Fix module.exports.x --> export list emit

* fix isLocalImport predicate

* require only creates aliases in JS

* re-handle json imports

* update fourslash baseline

* Cleanup in the checker

1. Simplify alias resolution.
2. Simplify variable-like checking.
3. Make binding skip require calls with type tags -- they fall back to
the old require-call code and then check from there.

I haven't started on the declaration emit code since I don't know what
is going on there nearly as well.

* Function for getting module name from require call

* First round of cleanup plus a new test

Found one missing feature, not sure it's worth adding.

* more small cleanup

* more cleanup, including lint

* use trackSymbol, not serializeTypeForDeclaration

* Code review comments, plus remove unneeded code

Ad-hoc type reference resolution for `require` isn't needed anymore.

* find all refs works

* remove old ad-hoc code

* make it clear that old behaviour is not that correct

* update api baselines

* remove outdated comment

* PR feedback

1. Fix indentation
2. Add comment for exported JSON emit
3. Add test case for nested-namespace exports.

* add a fail-case test (which passes!)
2020-08-17 14:00:37 -07:00
Zen 0ed523bb60
fix jsx completions after attributes (#39859)
closes #39530
2020-08-13 16:14:12 -07:00
Eli Barzilay 620e260576 Avoid the double-symbol trick for enums
Nameless jsdoc typedefs have their exportedness controlled by the
exportedness of the location they pull their name from.

Fixes #33575.
2020-08-12 18:40:57 -04:00
Wenlu Wang 57e2fe0462
Improve deprecated suggestion node position (#39702)
* Improve deprecated suggestion node position

* fix typo

* Simplify code

* merge helper function
2020-08-10 17:37:11 -07:00
Nathan Shively-Sanders 3328fdb2d8
Use isUncalledFunctionReference for aliases too (#39950)
* Use isUncalledFunctionReference for aliases too

Fixes bogus deprecated notices on imports of functions with deprecated
overloads, but with some non-deprecated overloads.

Fixes microsoft/vscode#104238

* Just check all declarations, don't call isUncalledFunction
2020-08-07 10:07:55 -07:00
Jesse Trinity 91a7c359b3
Insert auto imports after header comment (#39924)
* place first import after header

* don't insert before non-header
2020-08-06 13:33:29 -07:00
Andrew Branch 7f4e1b699a
Find tagless JSDoc as preceding token (#39912) 2020-08-05 10:09:45 -07:00
Nathan Shively-Sanders c9f05af2c8
Merge pull request #37891 from Neonit/jsDocIndentationPreservation
Fix indentation preservation in JSDoc (#37717)
2020-08-04 16:09:50 -07:00
Orta Therox faf128de15
Fix formatting scanner on JSX text that looks like trivia (#39718)
* Fix formatting scanner on JSX text that looks like trivia

* Combine if statements

Co-authored-by: Andrew Branch <andrew@wheream.io>
2020-07-30 13:56:14 -04:00
Sheetal Nandi 48e58f44db
Handle unresolved baseType when trying to get completions for static member (#39731)
* Handle unresolved baseType when trying to get completions for static member
Fixes  #38067

* Update src/services/completions.ts

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

* correct the condition

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-07-24 16:37:28 -07:00
Andrew Branch ec33814616
Make AutoImportProviderProject work with symlinked monorepos (#39679)
* Hack everything together

* Add test

* Remove realpath from program

* Ensure symlinked directories are directories

* Revert unnecessary change

* Update baselines

* Use host program realpath on AutoImportProviderProject files before program creation

* Which fixes hasRoots() too

* Apply suggestions from code review

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

* Lint

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-07-22 13:53:30 -07:00
Andrew Branch b834096998
Fix emit/formatting issues in refactors (#39506)
* Fix #37948

* Fix formatter skipping tab/space fixup on comments, handle trailing commas in list closing line count.

Fixes #37944

* Add newline between imports and main body of new file in moveToNewFile

Fixes #37941

* Update baseline (probably broken before?)
2020-07-22 10:31:42 -07:00
Song e76d17257a
Fix 38219: signature helper works for optional function condition. (#39672)
* fix optional fuction condition.

* Adds a test

Co-authored-by: Orta <git@orta.io>
2020-07-22 12:30:21 -04:00
Song 294a0406e3
not escape unicode char for import path string. (#39463)
* not escape unicode char for import path string.

* fix test.
2020-07-22 11:28:29 -04:00
Song d897646a4a
fix 39453 (#39579)
* fix 39453

* add restriction.

* add tests

* comment.

* fix as suggestion.
2020-07-21 09:40:25 -07:00
Alexander T 6430211f8f
fix(38868): add separator for type parameters (#39621) 2020-07-16 10:58:16 -07:00
Wenlu Wang fcd4fcb3d7
Use combined node flags (#39403) 2020-07-15 09:22:12 -07:00
Wenlu Wang 7b728754c0
Fix incorrect deprecated mark (#39611)
* Fix incorrect deprecated mark

* improve test
2020-07-15 08:47:25 -07:00
Alexander T ececf3b0a7
fix(33511): show jsx namespace default import quick fix if it does not exists in the current scope (#38419) 2020-07-14 15:43:18 -07:00
Jesse Trinity 17022388bd
Add refactor convertToOptionalChainExpression (#39135)
* add convertOptionalChain

* cover more cases

* expose containsMatchingReference

* clean up performing edits

* bound start position

* add tests

* refactor and handle edge cases

* update tests

* consider explicit requests for empty spans

* update fourslash to use trigger reason

* add tests cases for trigger reason

* fix errors

* remove type assertion

* fix non ampersand chains

* clean up some logic

* add ternary case

* add diagnostic message

* add nullish check for ternary expressions

* Update src/services/refactors/convertToOptionalChainExpression.ts

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

* Update src/services/refactors/convertToOptionalChainExpression.ts

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

* Update tests/cases/fourslash/refactorConvertToOptionalChainExpressionForTriggerReason3.ts

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

* Update tests/cases/fourslash/refactorConvertToOptionalChainExpressionForTriggerReason1.ts

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

* reformat and remove unused checks

* allow any for ternary refactor

* add tests

* add tests

* check return and variable statements

* use isMatchingReference instead of containsMatchingReference

* allow partial selections

* fine tune selection ranges

* recurse for call expressions

* fix spellings

* add recursive cases

* remove isOrContainsMatchingReference

* cleanup

* more refactoring

* cleanup

* rename tests

* address PR comments

* check match syntactically

* handle another call expression case

* some renames

* inline some checks

* add test

* address comments

* add refactorNotAvailableReason

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-07-13 19:33:33 -07:00
Armando Aguirre 6279f981b3
Merge pull request #37029 from armanio123/AddToggleCommentFeature
Add ToggleLineComment and ToggleMultilineComment service
2020-07-13 17:48:50 -07:00
Andrew Branch 3c91133f97
Fix find-all-references on undefined (#39591)
* Fix find-all-references on `undefined`

* Show references in input files in baseline

* Inline commentEachLine

* firstOrUndefined doesn’t take undefined
2020-07-13 17:21:16 -07:00
Armando Aguirre 0d38f09e36 PR comments and minor bugs 2020-07-10 17:44:02 -07:00
Armando Aguirre ef81a0d0ee Merge remote-tracking branch 'upstream/master' into AddToggleCommentFeature 2020-07-09 21:55:36 -07:00
Armando Aguirre b81f240e96 PR comments 2020-07-09 18:35:54 -07:00
Sheetal Nandi b397d1fd4a
Fixes searches for export * as 'identifier' (#39533)
* Fixes searches for export * as 'identifier'
Fixes #39006

* Fix the context span to export declaration (was incorrectly set to sourceFile in prev commit)
2020-07-09 13:45:43 -07:00
ShuiRuTian bf1ea6508b
fix static method reference non-static (#38730)
* fix static method reference non-static

* fix contextRangeIndex

* fix lint.

* fix style.

* update according to suggestion.

* continue fix.

* use every rather than foreach

* format

* fix

* add comment.

* fix according to review suggestions.

* Update src/services/findAllReferences.ts

* Update src/services/findAllReferences.ts

* Update src/services/findAllReferences.ts

* Update src/services/findAllReferences.ts

* Update src/services/findAllReferences.ts

Co-authored-by: Song Gao <song.gao@laserfiche.com>
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-07-09 12:21:12 -07:00
Jesse Trinity 8e9de9bed2
Fix39458 (#39508)
* remove undefined from optional parameter

* accept baselines

* use getTypeWithFacts
2020-07-09 11:17:18 -07:00
Andrew Branch 03c79d7422
Insert auto-imports in sorted order (#39394)
* Sort auto-imports

* Avoid re-checking sort all the time

* Add comment
2020-07-08 15:25:04 -07:00
Alexander T 48c19eebaf
fix(25155): add space before optional parameters/properties (#38798) 2020-07-08 13:38:15 -07:00
Sheetal Nandi 0f86c04af3
Fixes searches for symbols exported using export * as (#39507)
Fixes #39006
2020-07-08 13:31:21 -07:00
Alexander T ebac7ec08f
fix(39421): omit prefix text for rest binding element (#39433) 2020-07-08 13:25:28 -07:00
Alexander T 8795458d6d
fix(39440): show QF for abstract classes with methods which include 'this' parameter (#39465) 2020-07-08 12:36:42 -07:00
Nathan Shively-Sanders 53a756ea63
Type this in more constructor functions (#39447)
* Type `this` in more constructor functions

Previously,  `this: this` in constructor functions only when there was
an explicit `@constructor` tag on the function. Now, `this: this` for
any function that's known to be a constructor function.

This improves completions inside constructor functions; also note that
previously the compiler *did* type `this: this` inside methods of constructor
functions, so this fix makes us more consistent. This is reflected in
the large number of baselines that improve.

The fix is a simple switch to `isJSConstructor`, which is the standard
way to detect constructor functions. I'm not sure why the original PR
didn't use this method.

I remember discussing this limitation in the original bug, #25979, and
I guess I decided that it made sense. But I was heavily primed by the bug's
framing of the problem in terms of `noImplicitThis`, which *should*
require an explicit `@constructor` tag.

With better typing comes better detection of `@readonly` assignment; I
had to fix the readonly detection code to use `isJSConstructor` as well.

* Remove `Add @class tag` fix for noImplicitThis.

The new rules mean that it never applies. It's possible that it should
apply to functions like

```js
function f() {
  this.init()
}
```

In which `init` is never defined, but I think this program is incomplete
enough that not offering the fix is fine.

* Fix precedence of `@this`

Previously, both `@class` and `@this` in a jsdoc would cause the `@this`
annotation to be ignored. This became a worse problem with this PR,
because `this` is correctly typed even without the annotation.

This commit makes sure that `@this` is checked first and used if
present.
2020-07-08 08:44:17 -07:00
Wesley Wigham 62b4377acf
Fix test semantic merge conflict between #39348 and #39130 (#39478) 2020-07-07 14:30:58 -07:00
Andrew Branch 0c75021860
Process type nodes in codefixes/refactors for auto-imports recursively (#39130)
* Process type nodes for auto-imports recursively

* Rename function
2020-07-07 13:11:23 -07:00
Nathan Shively-Sanders 1814e2a5c4
Mark @typedef as a type declaration (#39468)
* Mark @typedef as a type declaration

This is only important right now for marking uses of deprecated tags due
to the way that deprecated type references are computed. But I'm
surprised it hasn't caused problems elsewhere.

Fixes #39466

* Also mark @callback and @enum

Requires making name lookup in isTypeDeclarationName smarter, but this
is only used by services, so shouldn't be too performance sensitive.
2020-07-07 10:37:52 -07:00
Alexander T 6b493f2048
fix(23871): change insertNodeAfter to replaceNode to avoid extra newlines (#38045) 2020-07-07 12:54:03 -04:00
Alexander T 2a92a6ea91
fix(39332): handle quotes preference in interface method signatures (#39348) 2020-07-06 17:00:35 -07:00
Wenlu Wang 453365284c
Avoid check for union keys (#39314) 2020-07-06 15:01:05 -07:00
Daniel Rosenwasser 77bf2045d8
Merge pull request #39379 from a-tarasyuk/bug/39346
fix(39346): Intelligent code completion not working in child class with composited base interface
2020-07-06 11:59:30 -07:00
ShuiRuTian f29e03eea5
autocomplete works for const assertion. (#39412)
* fix 39384

* add test
2020-07-06 08:49:50 -04:00
Nathan Shively-Sanders 93ccc17658
Node-based @deprecated checks (#39323)
* Node-based @deprecated checks

Switch the checker to syntactic checks for `@deprecated` on
declarations. This requires a bit more checking of declarations in the
checker at times, but it

1. Gets rid of work, and a symbol flag, in the binder.
2. Skips work in the checker unless there is a `@deprecated` tag.
3. Makes it fairly simple to only issue errors on particular signatures
   of overloaded functions.

* remove in-progress comment

* remove unused isTypeDeclaration

* ❤️ lint

* support jsx and tagged template functions

* Support decorators too
2020-07-02 14:09:59 -07:00
Alexander T d137e4a23b fix(39346): show completion in inherited classes from the composited base interface 2020-07-02 11:40:17 +03:00
Nathan Shively-Sanders df5981319f
Fix crash on completion in jsdoc namepath (#39347)
contextToken may be undefined, so the isAssertionExpression call in
filterGlobalCompletion needs to check for undefined.
2020-06-30 15:53:13 -07:00
Andrew Branch e2c5a90cc3
Disable signature help on unresolved bare identifiers; add more declaration info on other unresolved calls (#39352)
* Disable signature help on unresolved bare identifiers; add more declaration info on unresolvedproperty access

* Remove stray ts-ignore
2020-06-30 14:25:27 -07:00
Alexander T 8b6a88700e
fix(32297): add quick-fix action to delete parameter destructuring elements (#38764) 2020-06-30 11:44:47 -07:00
Daniel Rosenwasser 1bbd5ef36b
Merge pull request #38754 from a-tarasyuk/feat/25259
feat(25259): Better error report for equals instead of colon in object literals
2020-06-30 01:56:26 -07:00
Alexander T 21a26ca08a feat(25259): add better error to report for equals instead of the colon in object literals 2020-06-30 10:33:56 +03:00
Daniel Rosenwasser 619658bd44
Merge pull request #39109 from Kingwl/lambda_span
Add outlining spans for call expression or arrow body
2020-06-29 23:33:04 -07:00
Daniel Rosenwasser 57dd722ab6
Merge pull request #38776 from a-tarasyuk/bug/29890
fix(29890): JSX: "extract to constant" generates invalid code
2020-06-29 14:09:52 -07:00
Wesley Wigham 99bec5067b
Use mapped rest type member when expanding rest parameter names (#39317)
* Use mapped rest type member when expanding rest parameter names

* Add test for #39228 which is also fixed by parameters having unique names
2020-06-29 12:30:23 -07:00
Alexander T ee5c3fa57d
fix(39047): handle extra spaces after the catch statement (#39306) 2020-06-29 10:10:44 -07:00
Alexander T c75af697af fix(29890): wrap variable/method/property to jsx expression 2020-06-28 10:51:11 +03:00
Andrew Branch 3d22a4fd72
Preserve newlines between try/catch/finally, if/else, do/while (#39280)
* Preserve newlines between try/catch, if/else, do/while

* Update baselines
2020-06-26 14:48:19 -07:00
Alexander T 95690c0aca
fix(38840): omit completions for a spread like argument in a function definition (#38897) 2020-06-26 09:38:05 -07:00
Alexander T 59f80970d9
fix(38785): include in NavigationBar child items from default exported functions (#38915) 2020-06-26 09:35:27 -07:00
Andrew Branch 086e00de91
Expand auto-import to all package.json dependencies (#38923)
* Start experiment

* Add logging

* Go back to a single program

* Fix forEachExternalModuleToImportFrom

* Move auxiliary program to language service

* Add logging

* Don’t use resolution cache

* Fix(?) containingProjects for ScriptInfo in auxiliary program

* Fix ScriptInfo project inclusion

* Add test for default project of auto-importable ScriptInfo

* Add fourslash server test

* Don’t create auto import provider inside node_modules

* Add monorepo-like test

* WIP

* Naively ensure autoImportProvider is up to date after package.json change

* Start limiting when auto update provider gets updated

* Respond to changes in node_modules

* Don’t create auto-import provider until a file is open that would use it

e.g., don’t create them during cross-project find-all-refs

* Clean up naming, @internal marking, and fix empty project creation bug

* Drop devDependencies, include peerDependencies

* Add additional compiler options

* Fix interaction with importSuggestionsCache

* Move option to UserPreferences, allow inclusion of devDependencies

* Don’t filter out peerDependencies

* Watch unparseable package.jsons

* But don’t filter packages out due to an invalid package.json

* Update test

* Don’t use autoImportProvider in codefixes where it can never be used (or any refactors)

* Add CompletionEntry property for telemetry

* Add assertion for isPackageJsonImport to fourslash

* Fix missing pushSymbol argument

* Add isPackageJsonImport to tests and API baselines

* Fix unit test

* Host auto import provider in new Project kind

* Fix InferredProject attaching on AutoImportProvider-included files, load eagerly

* Update Public APIs

* Simplify PackageJsonCache host

* Remove unneeded markAsDirty

* Defer project finished event until after AutoImportProvider is created

* Make AutoImportProviderProject always report isOrphan = true

* Close and remove AutoImportProviderProject when host project closes

* Don’t set pendingEnsureProjectForOpenFiles

* Use hasAddedOrRemovedFiles instead of hasNewProgram

* Use host-wide watchOptions for package.json watching

* Add to `printProjects`

* Clean up

* Get autoImportProvider directly from LanguageServiceHost

* Clean up

* Clean up

* Close auto import provider on disableLanguageService

* Move AutoImportProvider preload to project updateGraph

* Clear auto import suggestion cache when provider program changes

* Fix tests

* Revert yet-unneeded change

* Use projectService host for module resolution host

* Don’t re-resolve type directives if nothing has changed

* Update src/server/project.ts

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

* Use ts.emptyArray

Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2020-06-22 16:34:27 -07:00
Ron Buckton fe33e61823
Reparse top level 'await' in modules (#39084)
* Reparse top-level 'await' in modules

* Add more tests and additional diagnostics

* One more incremental parse test
2020-06-18 23:43:18 -07:00
Wenlu Wang 59ad375234
Add deprecated related feature (#38523)
* Add deprecated related feature

* Add more support

* fix navtree

* Add identifier check

* Add more deprecated

* fix crash

* fix more crash

* fix crash

* improve diagnostic

* avoid new tag

* avoid tags

* accept baseline

* Check deprecated in binder

* fix baseline

* fix jsdoc cache

* fix incorrect fix

* Avoid useless changes

* Accept baseline

* Add tests

* fix perf

* fix public api

* Adjust deprecated mark on qualifed name

* Revolve alias symbol

* Use modifier flags insted of symbol props

* Fix modifier flag resolve

* Make lint happy

* Fix crash

* fix crash

* Add cached utils function

* Accept baseline

* Add more tests

* try pinning octokit again

* Avoid tests

* Use utils some

* Deprecated perf test (#3)

* check valueDeclaration only

* check without modifierFlags

* donot check alias

* use cached tag

* remove call to jsdoc

* use deprecated tag

* revert changes

* Revert mission changes

* use node flags

* cache result

* cache

* avoid modifier flags

* Opts

* fix jsdoc include modifier

* fix tests

* fix again

* use symbol flag

* set @octokit/rest back to latest

* fix trailing spacel int

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-06-18 17:41:26 -07:00
Jacob Bandes-Storch 8136047a3d
Code fix for accidental calls to get-accessors (#38749)
* add code fix

* fix forEachChild and update some baselines

* excluding them from forEachChild is easier!

* cleanup

* review feedback

* fix whitespace
2020-06-18 13:58:42 -07:00
ShuiRuTian 8293e517c0
fix rename cause import change wrongly (#38462)
* use canonical file name when resolve module

* renameSync in vfs supports same folder.

* Update src/harness/vfsUtil.ts

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>

* change tss rather than compiler.

* remove useless comment.

* use fileName rather than path.

Co-authored-by: Song Gao <song.gao@laserfiche.com>
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2020-06-18 08:31:30 -07:00
kingwl 4d57d591d2 Avoid semi 2020-06-18 10:33:17 +08:00
kingwl 98a74ddfe8 Update baseline 2020-06-17 22:41:08 +08:00
kingwl 3b8ad5c870 Add outlining spans for call expression or arrow body 2020-06-17 20:50:19 +08:00
Ron Buckton eb3645f16b
Refactor node factory API, use node factory in parser (#35282)
* Refactor node factory API, use node factory in parser

* Move UnparsedSource nodes to factory

* Make most Node properties read-only

* Make pos/end/parent and JSDoc 'comment' read-only

* Update function/constructor-type factories

* Remove treeStateObserver

* Simplify Debug.deprecate

* Remove unused factory methods, simplify lazy factory methods

* Fix base factory used for source file updates

* Update test baseline due to merge from master

* Rename factory methods to be more consistent (#39058)
2020-06-16 16:55:03 -07:00
Andrew Branch 852e7a0b60
Add containerName to CallHierarchyItem (#38997)
* Add containerName to CallHierarchyItem

* Update public APIs

* Update test to demonstrate nested namespace working
2020-06-10 11:56:03 -07:00
Nathan Shively-Sanders d841971347
Merge pull request #38358 from a-tarasyuk/bug/38081
fix(38081): 'Debug Failure. Invalid cast.' for convert import quick fix
2020-06-09 08:50:56 -07:00
Eli Barzilay a4c14a2cdc getSymbolDisplayPartsDocumentationAndSymbolKind: use actual symbol.flags for getAliasedSymbol
Fixes #35347.
2020-06-04 13:50:33 -04:00
Jesse Trinity 3b15b35b37
Merge pull request #38378 from jessetrinity/refactorTriggerReason
Add RefactorTriggerReason
2020-06-03 11:18:08 -07:00
Eli Barzilay 073fb308bf Fix two tests
* `docCommentTemplateInSingleLineComment`: Accidentally dropped space, fixes #38651

* `codeFixCorrectReturnValue13`: Bogus test code copied
2020-06-03 12:59:16 -04:00
Jesse Trinity d88ea4e1f8 address PR comments 2020-06-02 19:06:12 -07:00
Jesse Trinity 463f8e10b9
Merge pull request #38734 from a-tarasyuk/bug/34934
fix(34934): Completions for private members appear in JavaScript files
2020-06-02 12:47:17 -07:00
Alexander T bc502c8c3c fix(38081): allow transforming object binding to named imports 2020-06-02 11:23:56 +03:00
Jesse Trinity 52dad733db
Merge branch 'master' into m-lambda-to-fn 2020-06-01 13:53:19 -07:00
Jack Works 8e290e5aae
Improve error range for ts2657 (jsx expr must have parent element), add code fix for it (#37917)
* fix: range of ts2657 (jsx expr must have parent) and remove 2695 (LHS expr of comma has no side effects)

* feat: add code fix for 2657

* fix: resolve review

* chore: hoist a var

* chore: add test for skipTrivia

* fix: rebase error

* Update src/compiler/diagnosticMessages.json

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

* Update src/services/codefixes/wrapJsxInFragment.ts

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrew@wheream.io>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2020-06-01 12:22:44 -07:00
Alexander T 4f0b81d415
fix(32341): add prefix name for module exports properties (#38541) 2020-06-01 11:45:05 -07:00
Alexander T fa49ac0b78
fix(19385): add space after brace in the multiline string template (#38742) 2020-06-01 10:30:52 -07:00
Alexander T 68d2ee055c
fix(38815): dive in arrow functions to check only this usage instead of checking all statements (#38865) 2020-06-01 10:27:11 -07:00
Jesse Trinity a86a2fa703 polish tests 2020-05-29 13:03:14 -07:00
Jesse Trinity 2db0054444 remove outdated tests 2020-05-29 13:03:11 -07:00
Jesse Trinity f479279217 convert import trigger reason test 2020-05-29 13:03:08 -07:00
Jesse Trinity c20908a3e7 convert export trigger reason test 2020-05-29 13:03:01 -07:00
Jesse Trinity 4971c7d546 remove declaration 2020-05-29 13:02:55 -07:00
Jesse Trinity 3e1e61470b Revert "update refactorConvertImport_partialSelection"
This reverts commit e28d8a0895f118321c37016a6dad4751a7c13673.
2020-05-29 13:02:52 -07:00
Jesse Trinity 86122c412f convert get set test 2020-05-29 12:55:52 -07:00
Jesse Trinity 673a86833a update test names 2020-05-29 12:55:48 -07:00
Jesse Trinity 3825d193f6 extract symbol test 2020-05-29 12:55:43 -07:00
Jesse Trinity df8ff659c5 extract type test 2020-05-29 12:55:39 -07:00
Jesse Trinity 85e0d8b14a add refactorNotAvailableForTriggerReason 2020-05-29 12:55:35 -07:00
Jesse Trinity dc363f10fc fix some indices 2020-05-29 12:55:32 -07:00