Nathan Shively-Sanders
6bd1da20c9
Rename JS-specific concepts ( #26795 )
...
* Rename JS concepts
1. Assignment declaration -- an assignment that is treated like a
declaration. Previously called [JS] special (assignment|declaration),
among other things.
2. Expando -- a value that can be used as a target in assignment
declarations. Currently, a class, function or empty object literal.
Functions are allowed in Typescript, too. Previously called a JS
container, JS initializer or expando object.
3. JavaScript -> Javascript. This is annoying to type, and looks like
'Java Script' in a camelCase world.
Everything is a pure rename as far as I know. The only test change is
the API baselines, which reflect the rename from SymbolFlags.JSContainer
to SymbolFlags.Assignment.
* Remove TODO
* Rename Javascript->JS
Note that this introduces a variable name collision in a couple of
places, which I resolved like this:
```ts
const isInJavascript = isInJSFile(node);
```
2018-09-12 10:44:46 -07:00
Ryan Cavanaugh
5a26747428
Merge pull request #27004 from RyanCavanaugh/noJsNewModuleCompletions
...
Don't offer module completions in non-module JS files
2018-09-12 08:32:14 -07:00
Andy
24a5bdd1b1
Add 'fileToRename' property to RenameInfo ( #24702 )
...
* Add 'fileToRename' property to RenameInfo
* Update tests
* Support directory rename
2018-09-10 11:25:03 -07:00
Ryan Cavanaugh
95ba73e16b
Don't offer module completions in non-module JS files
2018-09-10 11:24:51 -07:00
Ron Buckton
af8e44ac85
Merge pull request #26568 from Microsoft/typesVersions
...
Adds support for "typesVersions" redirects
2018-09-07 15:40:50 -07:00
Ron Buckton
a255d9a163
Merge branch 'master' into typesVersions
2018-09-07 13:52:12 -07:00
Andy
cbde861af6
Improve use of SemanticMeaning in symbol display ( #26953 )
2018-09-07 12:23:23 -07:00
Andy
b1430e5e2c
Avoid adding duplicate completion from contextual keyword ( #26947 )
2018-09-07 12:18:03 -07:00
Andy
d31973b905
findAllReferences: Consistently use 'this' parameter as definition site ( #26950 )
2018-09-06 17:06:50 -07:00
Andy
c401d63c5f
findAllReferences: Fix declarationIsWriteAccess for PropertyAssignment in destructuring ( #26949 )
2018-09-06 15:24:07 -07:00
Andy
a0ebbfb8f0
Fix JSX completions after boolean property ( #26943 )
2018-09-06 14:15:12 -07:00
Andy
8c22770ea8
Improve 'isWriteAccess' for findAllReferences ( #26889 )
2018-09-06 10:44:32 -07:00
Andy
1eb3082387
Support completions inside JSDoc before EndOfFileToken ( #25568 )
2018-09-05 11:34:27 -07:00
Andy
bcb815b3ac
Remove duplicate function createTextRange ( #23346 )
...
* Remove duplicate function createTextRange
* Always allow end=-1
* Put noAssert back, pending #23370
* Use getRangeUnion helper
* Update API (#24966 )
2018-09-05 11:19:56 -07:00
Nathan Shively-Sanders
540e8b9eb0
Collect jsdoc tags for type parameters ( #26824 )
...
Before the template tag, there was no reason to do this, but now you can
add JSDoc for type parameters in Typescript.
2018-09-04 09:29:19 -07:00
Benjamin Lichtman
6ddf75209a
Merge pull request #26749 from uniqueiniquity/getWholeType
...
Use correct type for async refactoring diagnostics
2018-08-31 09:09:25 -07:00
Benjamin Lichtman
64bbf8925c
Allow for undefined in type
2018-08-30 16:53:46 -07:00
Andy
cea49dfb0d
Completion for tuple index doesn't need to include quotes ( #26750 )
2018-08-29 16:38:42 -07:00
Andy
f78dc2ad11
importFixes: Only provide a fix using the best module specifier for a given module ( #26738 )
2018-08-29 16:18:56 -07:00
Benjamin Lichtman
bb892d951d
Use non-diagnostics-producing typechecker to get type
2018-08-29 15:54:19 -07:00
Benjamin Lichtman
97e539339d
Add comment explaining special casing
2018-08-29 15:53:34 -07:00
Benjamin Lichtman
158f0b0c0b
Allow codefix to apply to function expression in variable declaration
2018-08-29 15:52:35 -07:00
Ron Buckton
210de32933
Merge branch 'master' into typesVersions
2018-08-29 13:26:13 -07:00
Andy
02630273a2
codeFixInferFromUsage: Assume that using x[0] means that x is an array ( #26739 )
...
* codeFixInferFromUsage: Assume that using `x[0]` means that `x` is an array
* Remove unnecessary '||' with non-falsy LHS
If only there were some kind of type-checker for JavaScript that could detect this sort of thing
2018-08-29 11:37:31 -07:00
Andy
0feeb48783
Make generator function name a completion list blocker ( #26640 )
...
* Make generator function name a completion list blocker
* Improvements for class/object members
* Separate KeywordCompletionFilter.None and .All
2018-08-29 10:53:32 -07:00
Ron Buckton
5f6a2cbf69
Merge branch 'master' into typesVersions
2018-08-28 17:37:23 -07:00
Andy
9106fdbc47
Support signature help for type parameters of a type ( #26702 )
2018-08-28 14:21:09 -07:00
Andy
552bd1c8a2
Support import fix/completions for export = ( #25708 )
2018-08-28 13:04:11 -07:00
Andy
b94061c587
getEditsForFileRename: Avoid changing import specifier ending ( #26177 )
...
* getEditsForFileRename: Avoid changing import specifier ending
* Support .json and .jsx extensions
* Restore typeRoots tests
* Fix json test
* When --jsx preserve is set, import ".tsx" file with ".jsx" extension
* Support ending preference in UserPreferences
2018-08-28 13:03:24 -07:00
Andy
b183418124
Fix bug: Don't go to *any* constructor signature for jsx element ( #26715 )
2018-08-28 11:06:14 -07:00
Ron Buckton
dc5cd9676b
Switch to paths-like pattern matching
2018-08-28 09:33:03 -07:00
Andy
4cf5774c5e
Add tsserver test for completions and avoid excess properties ( #25622 )
2018-08-27 16:04:02 -07:00
Andy
e411381266
Fix bug: Don't let empty signature documentation override other documentation ( #26638 )
2018-08-27 09:38:52 -07:00
Wenlu Wang
8ba501926a
try get add missing member return type from context ( #26250 )
...
* try get add missing member return type from context
* support contextual type
2018-08-23 21:31:53 -07:00
Andy
f3ceebe552
Fix duplicate completions bugs ( #26648 )
...
* Fix duplicate completions bugs
* Remove old TODO
2018-08-23 18:22:07 -07:00
Ron Buckton
79d7f371bb
Merge branch 'master' into typesVersions
2018-08-21 15:47:10 -07:00
David Sherret
0baf7465a5
Remove todo.
2018-08-21 13:29:32 -04:00
David Sherret
d00ad19bd7
Provide a default script target for the document registry.
2018-08-20 20:59:06 -04:00
Ron Buckton
6f7a37c99a
Added fourslash test
2018-08-20 17:44:34 -07:00
Ron Buckton
015babb6f7
Initial support for 'typesVersions'
2018-08-20 16:57:18 -07:00
Andy
ee25cdecbc
Update LKG and remove newly unnecessary non-null assertions ( #26515 )
2018-08-17 09:13:43 -07:00
Andy
ad63468ed5
noUnusedLocals: f(x = 1) does not use x ( #26366 )
2018-08-13 11:14:52 -07:00
Sheetal Nandi
2b83b67aa3
Merge pull request #26140 from Kingwl/completionUnionType
...
improve completions for union type in type arguments
2018-08-13 10:36:19 -07:00
Elizabeth Dinella
421730a68d
Refactoring promises returning functions to use async and await ( #26373 )
2018-08-10 16:11:45 -07:00
Andy
08f5edbd03
Treat NoSubstitutionTemplateLiteral like StringLiteral in more places ( #26330 )
...
* Treat NoSubstitutionTemplateLiteral like StringLiteral in more places
* Move isStringOrNumericLiteral closer to its only use
2018-08-10 16:00:08 -07:00
Andy
4bb740218d
getDefaultExportInfo: Use getImmediateAliasedSymbol instead of getAliasedSymbol ( #26364 )
2018-08-10 14:35:18 -07:00
Andy
5efd1cb4a7
fixAddMissingMember: Support interface and don't crash on type parameter ( #25995 )
...
* fixAddMissingMember: Support interface and don't crash on type parameter
* Remove InfoBase
2018-08-09 17:32:28 -07:00
王文璐
23601a10b8
improve completions for union type in type arguments
2018-08-09 17:26:34 +08:00
Andy
1a05f13aef
moveToNewFile: Don't remove empty named imports ( #26265 )
2018-08-07 12:54:46 -07:00
Andy
794f3a5e76
goToTypeDefinition: Go to function return type ( #25952 )
...
* goToTypeDefinition: Go to function return type
* Add more tests
* If a function returns 'void' or some other type with no definition, just return the function definition.
2018-08-07 12:54:19 -07:00