Andy
a641e6f85f
goToDefinition: Put variable definition before signature definition ( #24649 )
...
* goToDefinition: Put variable definition before signature definition
* Fix lint
2018-06-04 14:13:27 -07:00
Nathan Shively-Sanders
34e68efdae
Template tag allows specification of constraints ( #24600 )
...
* Parse (and mostly support) template tag constraints
A bunch of tests hit the asserts I added though.
* Messy version is finished. Need to add a few tests
* Refactor to be smaller
* Small refactor + Add one test
* Another test
* Minor cleanup
* Fix error reporting on type parameters on ctors
* Simplify syntax of `@template` tag
This is a breaking change, but in my sample, nobody except webpack used the
erroneous syntax. I need to improve the error message, so
jsdocTemplateTag3 currently fails to remind me of that.
* Better error message for template tag
* Fix fourslash baselines
* Another fourslash update
* Address PR comments
* Simplify getEffectiveTypeParameterDeclarations
Make checkGrammarConstructorTypeParameters do a little more work
2018-06-04 11:42:46 -07:00
Andy
2ce7e5f0cd
Add 'unknown' to type keywords ( #24606 )
2018-06-04 11:31:48 -07:00
Andy
d8cea359f7
moveToNewFile: Update namespace imports ( #24612 )
2018-06-04 11:30:14 -07:00
Andy
046c5ea6c1
moveToNewFile: Ignore reference to global ( #24651 )
2018-06-04 10:35:23 -07:00
Andy
886377f8d3
Add autoCloseTag language service ( #24543 )
...
* Add autoCloseTag language service
* Change name to getJsxClosingTagAtPosition and return an object
2018-06-04 10:08:15 -07:00
Dan Freeman
4a36ee0c62
Support import completion for merged declaration exports ( #24539 )
2018-06-01 09:46:56 -07:00
Andy
d671c7ae96
getEditsForFileRename: Support directory rename ( #24305 )
...
* getEditsForFileRename: Support directory rename
* Code review
* Handle imports inside the new file/directory
* Document path updaters
* Shorten relative paths where possible
* Reduce duplicate code
* Rewrite, use moduleSpecifiers.ts to get module specifiers from scratch instead of updating relative paths
* Update additional tsconfig.json fields
* Add test with '.js' extension
* Handle case-insensitive paths
* Better tsconfig handling
* Handle properties inside compilerOptions
* Use getOptionFromName
2018-06-01 08:23:37 -07:00
Zen
95df51b7cf
remove redundant assertions in fourslash tests ( #24561 )
2018-06-01 08:16:03 -07:00
Andy
9d42ab983d
implementations: Use declaration name for the span ( #24537 )
...
* implementations: Use declaration name for the span
* Always get name in nodeEntry
2018-05-31 13:32:02 -07:00
Zzzen
2a8ff1c8d9
Merge remote-tracking branch 'ms/master'
2018-05-31 20:49:43 +08:00
Andy
2cb46407b1
moveToNewFile: Remove newlines after last moved statement ( #24503 )
2018-05-30 15:16:03 -07:00
Vyacheslav Pukhanov
75f20f9b65
fixUnusedIdentifier: fix "Remove variable statement" codefix ( #24497 )
...
* fixUnusedIdentifier: fix "Remove variable statement" codefix
* Add test for a single "Remove variable statement" codefix in a file
2018-05-30 14:51:08 -07:00
Nathan Shively-Sanders
cdfa63aa40
Fix exported type resolution in commonjs ( #24495 )
...
* Fix resolution of exported types in commonjs
It is fine to resolve the types of exported classes in ES6:
```js
export class C {
}
var c = new C()
```
But not for commonjs exported classes:
```js
module.exports.C = class {
}
var c = new C() // should error
```
Fixes #24492
* All jsdoc type aliases are available locally in commonjs modules
* Check that location isSourceFile before commonJsModuleIndicator
2018-05-30 14:12:38 -07:00
Andy
43bf039a94
Add refactor to convert namespace to named imports and back ( #24469 )
...
* Add refactor to convert namespace to named imports and back
* Add tests and comments
* Code review
* Handle shorthand property assignment and re-export
* Don't use forEachFreeIdentifier
* Fix rename after "."
2018-05-30 14:11:53 -07:00
Andy
77371679be
Support getting references even if quickInfo failed ( #24476 )
...
* Support getting references even if quickInfo failed
* Add test
2018-05-30 14:11:36 -07:00
Mohamed Hegazy
c47df3a8fd
Merge pull request #24438 from vpukhanov/issue-22674
...
addMethodDeclaration: add after quickfix location if possible
2018-05-30 10:30:01 -07:00
Mohamed Hegazy
04dc76ec9c
Merge pull request #24442 from Kingwl/fix-implement-interface-with-extends-class
...
add lookup for extends class when implement interface
2018-05-30 09:20:50 -07:00
Andy
5e2c7ffce6
isValidMethodAccess: use getTypeOfPropertyOfType instead of getTypeOfFuncClassEnumModule ( #24488 )
2018-05-30 09:12:24 -07:00
Andy
011a4df4dd
Don't allow to rename string literal ( #24477 )
2018-05-30 07:50:48 -07:00
王文璐
2cb211305b
Merge branch 'master' into fix-implement-interface-with-extends-class
2018-05-30 09:05:56 +08:00
Andy
e99be8c47d
Avoid duplicate import completions when a namespace is exported by two different modules ( #24473 )
2018-05-29 15:52:34 -07:00
Andy
8bc1932ed5
moduleSpecifiers: Don't return a relative path to node_modules ( #24460 )
2018-05-29 12:40:06 -07:00
Andy
160b667846
fixUnusedIdentifier: Don't remove parameter in override or non-last parameter in callback ( #24306 )
...
* fixUnusedIdentifier: Don't remove parameter in override or non-last parameter in callback
* Only allow removing last parameters; don't care about contextual type
2018-05-29 12:39:45 -07:00
Andy
816f1cee5a
Include '...' on doc comment for rest parameter ( #24462 )
2018-05-29 12:17:57 -07:00
王文璐
f9a55beec5
add lookup for extends class when implement interface
2018-05-28 18:38:07 +08:00
Vyacheslav Pukhanov
1bc5977e3a
Update undeclared method quickfix tests
2018-05-28 00:09:47 +03:00
Zzzen
dbe87a6741
Document highlights on yield keywords highlight other occurrences in the same body
2018-05-25 20:48:08 +08:00
Wesley Wigham
8f9c0861bc
Use external aliases in quickinfo and signature help return types ( #24391 )
...
* Dont include import types in quick info type names
* Add UseAliasDefinedOutsideCurrentScope flag to LS operations which were missing it
2018-05-24 15:19:57 -07:00
Elizabeth Dinella
b745ea059e
Fix to issue 23326 for completions on new.target ( #24342 )
...
* Fix to issue 23326 for completions on new.target
* Fixed linting issues - whitespace in if statements
* Removed debug statement in test case and consolidated and cleaned up code in switch statement for completions
* Added support for import.meta completion
2018-05-24 14:12:33 -07:00
Andy
16af96b006
moveToNewFile: Format the new file ( #24379 )
2018-05-24 11:08:32 -07:00
Andy
bc570cd85f
moveToNewFile: Respect UserPreferences#quote ( #24365 )
2018-05-24 09:36:37 -07:00
Mohamed Hegazy
dd6dc5e27a
Merge pull request #24328 from Microsoft/getEditsForFileRename_oldFileStillPresent
...
getEditsForFileRename: Handle old file still being present
2018-05-23 16:16:00 -07:00
Wenlu Wang
4606709672
add code fix convert to mapped object type ( #24286 )
...
* add code fix convert to mapped object type
* add support for type literal and improve test
* fix typo
* add support for heritageClauses
* only determine declaration is not class
2018-05-23 14:09:49 -07:00
Andy
fb4caadaec
Support signature help for partially-filled-in type arguments f< ( #24138 )
...
* Support signature help for partially-filled-in type arguments `f<`
* Use `isPossiblyTypeArgumentPosition` and support new expressions
2018-05-23 08:28:09 -07:00
Sheetal Nandi
16d7f4c103
Merge pull request #24348 from Microsoft/findRefInJson
...
Fix getter of local symbol for export= when it is json module
2018-05-22 20:15:59 -07:00
Sheetal Nandi
a0d4e4f059
Fix getter of local symbol for export= when it is json module
...
Fixes #24341
2018-05-22 17:10:56 -07:00
Andy
aed0eb6693
Improve verify.codeFixAvailable ( #24325 )
...
* Improve verify.codeFixAvailable
* Revert change to `verify.not.codeFixAvailable()`, and use `assertObjectsEqual` for better errors
2018-05-22 16:04:39 -07:00
Andy
ba63f49513
moveToNewFile: Don't provide refactor if selection is just imports ( #24336 )
2018-05-22 15:21:04 -07:00
Andy
5622bc2dd6
moveToNewFile: Support selecting the name of a declaration ( #24331 )
2018-05-22 14:00:29 -07:00
Andy
9cda2bdba0
Support recommended completion for union ( #24326 )
...
* Support recommended completion for union
* Fix for empty enum, which is not a union
2018-05-22 13:38:28 -07:00
Andy
694a985b49
For completions, treat a '// @ts-check' file like a TypeScript one ( #24321 )
2018-05-22 13:06:59 -07:00
Armando Aguirre
b5d882ebd6
Merge pull request #24262 from armanio123/FixObjectLiteralExpression
...
Fix issue with formatting object literal csharp style
2018-05-22 12:39:14 -07:00
Andy Hanson
46eaf62abb
getEditsForFileRename: Handle old file still being present
2018-05-22 12:20:34 -07:00
Mohamed Hegazy
9d57903630
Merge pull request #24312 from Kingwl/multiline-type-literal-formatter
...
fix wrong formatting with multiline type literals with IntersectionTy…
2018-05-22 10:06:24 -07:00
Andy
982c8d0af9
Add suggestion diagnostics for unused label and unreachable code ( #24261 )
...
* Add suggestion diagnostics for unused label and unreachable code
* Always error on unused left hand side of comma
2018-05-22 07:56:29 -07:00
王文璐
4b47c0cb82
fix wrong formatting with multiline type literals with IntersectionType and UnionType
2018-05-22 14:01:04 +08:00
Armando Aguirre
0b18bdf590
Added tests
2018-05-21 18:22:13 -07:00
Andy
802dc2bb9b
fixUnusedIdentifier: If every VariableDeclaration is unused, remove the VariableStatement ( #24231 )
2018-05-21 15:54:33 -07:00
Andy
440291e316
Fix bug: Get merged module symbol in forEachExternalModule ( #24295 )
2018-05-21 10:48:50 -07:00