Andy
5e1872f0c0
getDocCommentTemplateAtPosition: Return result if in empty comment ( #26026 )
2018-07-27 17:34:16 -07:00
Andy
57d425169a
createJavaScriptSignatureHelpItems: Use array helpers and simplify ( #26025 )
2018-07-27 17:33:17 -07:00
Andy
d40d54984e
Support deleting all unused type parameters in a list, and deleting @template tag ( #25748 )
...
* Support deleting all unused type parameters in a list, and deleting @template tag
* Support type parameter in 'infer'
2018-07-27 11:55:31 -07:00
Andy
3bfe91cdd8
navigationBar: Fix bug for shorthand ambient module ( #25992 )
2018-07-26 17:27:12 -07:00
Andy
af3f737451
Fix bug for isValidTrigger when contextToken is undefined ( #25993 )
2018-07-26 17:26:58 -07:00
Andy
0e5af11625
Fix bugs for go-to-definition on mapped type method ( #25991 )
2018-07-26 17:26:41 -07:00
Andy
998c911c49
Break createSignatureHelpItems into functions ( #25948 )
2018-07-26 17:26:29 -07:00
Andy
0227997fa5
Use import().T for import completions/fixes of pure types in JS files ( #25852 )
...
* Use `import().T` for import completions/fixes of pure types in JS files
* Don't call tryUseExistingNamespaceImport if position undefined
2018-07-26 16:16:57 -07:00
Andy
673ae746da
Simplify and inline getPropertySymbolsFromType ( #25940 )
...
* Simplify and inline getPropertySymbolsFromType
* Combine lambdas
2018-07-26 11:52:22 -07:00
Andy
f12e9a8389
Minor refactor in goToTypeDefinition ( #25951 )
2018-07-25 17:10:06 -07:00
Andy
1e8a5bf2f1
signatureHelp: Factor out 'isSyntacticOwner' function ( #25518 )
2018-07-25 17:01:35 -07:00
Andy
7546fd03c6
Simplify getContainers ( #23323 )
2018-07-25 12:30:13 -07:00
Andy
d60f4988a6
In getPropertySymbolsFromContextualType, use union discriminant to filter types ( #25914 )
2018-07-25 11:53:20 -07:00
Nathan Shively-Sanders
9658b476c2
Fix inferFromUsage on index signatures ( #25934 )
...
* Fix inferFromUsage on index signatures
1. Check the argumentExpression to determine the index signature type.
Previously, the code mistakenly checked the type of the element access
itself, which never returned a good type.
2. If inference for the index signature type fails, substitute anyType.
Previously, the code would create a bad index signature with an
undefined type.
3. Add tests. Previously, there were no tests.
* Fixing (1) means that number index signatures are now created.
Previously, only string index signatures would be created.
* Fixing (2) means that index signatures will be inferred from single
usage like `return a[0]`. Previously, the refactoring would fail,
perhaps because of a check when stringifying the index signature (I
haven't tracked down why.)
* Update fourslash test with improved inference
2018-07-25 10:51:11 -07:00
Andy
e4d4b0ae4b
Handle PropertyAssignment in getCommentOwnerInfo ( #25911 )
2018-07-24 17:43:46 -07:00
Andy
93722c8942
findAllReferences/rename: Search in all open projects ( #25648 )
...
* findAllReferences/rename: Search in all open projects
* Avoid needing a dummy location when location is unused
* Remove Program#getDeclarationEmitPath
* Only iterate over enabled projects
2018-07-20 16:53:59 -07:00
Andy
3d672d9550
Ensure fixSpelling and importFixes still trigger on "Did you mean the instance/static member ..." ( #25847 )
2018-07-20 16:51:35 -07:00
Andy
e103692f32
Don't report quickInfo inside a comment in a PropertyAccessExpression ( #25813 )
2018-07-20 11:49:21 -07:00
Wenlu Wang
fedcd3a1b4
improve completions keyword for function like body ( #25824 )
2018-07-20 08:25:16 -07:00
Andy
46827f4a76
Handle completions at name of namespace declaration ( #25661 )
...
* Handle completions at name of namespace declaration
* Handle namespace merging
2018-07-19 10:26:18 -07:00
Andy
854462d383
Fix formatting at trailing comma ( #25706 )
2018-07-17 15:21:35 -07:00
Andy
89f2af17f0
Avoid using old node in import fix to use namespace import ( #25729 )
2018-07-17 13:34:56 -07:00
Andy Hanson
1038c76f88
navigationBar: Don't merge unrelated grandchildren
2018-07-16 12:38:38 -07:00
Andy
afdd47c9ce
Simplify rules for isControlFlowEndingStatement ( #25693 )
2018-07-16 11:17:46 -07:00
Jordi Oliveras Rovira
4f411a8cce
Change jsDocTagNames to lower case.
2018-07-14 01:02:20 +02:00
Andy
3f4412b173
getContainingList: Handle TypeAliasDeclaration ( #25614 )
...
* getContainingList: Handle TypeAliasDeclaration
* Handle ClassExpression and InterfaceDeclaration
2018-07-13 10:30:22 -07:00
Andy
27da9eab8d
fixUnreachableCode: Don't delete whole block when non-first line is unreachable ( #25625 )
2018-07-13 09:57:04 -07:00
Andy
88c6ced3c6
indentMultilineCommentOrJsxText: Fix bug when 'parts' is empty ( #25645 )
2018-07-13 09:56:21 -07:00
Andy
af412e39cf
mapTextChangesToCodeEditsUsingScriptInfo: Handle tsconfig.json text change ( #25586 )
...
* mapTextChangesToCodeEditsUsingScriptInfo: Handle tsconfig.json text change
* Can't use `program.getSourceFile()` to determine file existence when multiple projects exist
* Use direct union instead of discriminated union
2018-07-12 12:09:04 -07:00
Andy
f9764d17f0
fixUnusedIdentifier: Support deleting @template tag ( #25597 )
...
* fixUnusedIdentifier: Support deleting @template tag
* Just return createTextRangeFromNode instead of adjusting range
2018-07-12 11:26:17 -07:00
Andy
5f4a03c408
Ensure TypeChecker#getTypeAtLocation returns a defined result ( #25583 )
...
* Ensure TypeChecker#getTypeAtLocation returns a defined result
* Update additional baseline
2018-07-11 16:33:56 -07:00
Andy
52486ae362
Improve isPossiblyTypeArgumentPosition ( #25043 )
...
* Improve isPossiblyTypeArgumentPosition
* Update API (#24966 )
* Handle new Type<Type<
* Add test for `new C < C<`
2018-07-11 11:15:04 -07:00
Andy
5e2102799b
Reduce non-null assertions in getPropertySymbolsFromContextualType ( #24675 )
2018-07-10 16:53:08 -07:00
Andy
7a79a45aab
JSX closing tag completion: Include '>' if not already present ( #25551 )
...
* JSX closing tag completion: Include '>' if not already present
* Expand comment
2018-07-10 16:14:57 -07:00
Andy
b6640e9c5d
getJsxClosingTagAtPosition: Return a result if parent has same name and is unclosed ( #25557 )
2018-07-10 14:31:18 -07:00
Andy
1fc1495863
Increase span of unreachable code error ( #25388 )
...
* Increase span of unreachable code error
* Add a new diagnostic for each range of unreachable statements
* Update baselines
2018-07-10 11:45:16 -07:00
Andy
72be7156d2
Support completions for unique symbol exported from module ( #25537 )
2018-07-10 10:47:43 -07:00
Mohamed Hegazy
4bf42fd1c4
Merge pull request #25535 from Microsoft/fixAsserts
...
Fix assert and check for module symbol
2018-07-10 10:28:17 -07:00
Pi Lanningham
b3b6c3bdbc
Pass sourceFile to getChildren in getTokenAtPositionWorker ( #25505 ) ( #25538 )
...
For performance reasons, we should always pass sourceFile to getChildren
if available.
2018-07-09 18:15:40 -07:00
Andy
e9e5ebee73
getEditsForFileRename: Handle all projects and source-mapped files ( #25522 )
...
* getEditsForFileRename: Handle all projects and source-mapped files
* Update API (#24966 )
* Use areEqual
2018-07-09 17:58:02 -07:00
Mohamed Hegazy
2c70030c8a
Compare normalized fileNames
2018-07-09 17:28:10 -07:00
Mohamed Hegazy
68cd382d8f
Check for a module sysmbol existing before calling getReferencedSymbolsForModule
2018-07-09 17:26:35 -07:00
Benjamin Lichtman
b5f5513e4a
Merge pull request #25329 from uniqueiniquity/jsxFolding
...
Add outlining spans for JSX elements
2018-07-09 12:36:23 -04:00
Benjamin Lichtman
5c7b47e6e3
Pass sourceFile as appropriate
2018-07-09 08:54:57 -07:00
Daniel Rosenwasser
fe2baac33f
Merge pull request #25422 from Microsoft/actualSignatureHelpTriggers
...
Actual signature help trigger filtering
2018-07-08 22:09:35 -07:00
Wesley Wigham
831be5d078
Introduce truncation into node builder and symbol display part writer ( #24258 )
...
* Introduce truncation into node builder and symbol display part writer
* Change default maxa truncation length to 240
* Fancy truncation + higher hard limit
2018-07-06 14:58:46 -07:00
Daniel Rosenwasser
b706adb3dc
Merge remote-tracking branch 'origin/master' into youProbablyMeantThisDeclaration
2018-07-06 10:26:58 -07:00
Daniel Rosenwasser
32bb63cbcf
getSuggestionForNonexistentModule -> getSuggestionForNonexistentExport
2018-07-05 20:45:00 -07:00
Mohamed Hegazy
7a082d45f8
Merge pull request #25253 from micnic/master
...
Add missing jsdoc tag names
2018-07-05 16:36:03 -07:00
Andy
64555aa6a9
navigateTo: Collect results from all referenced projects. ( #25283 )
...
* navigateTo: Collect results from all referenced projects.
* Don't use project references, just source maps
* Move more code to session
* Test when implementation file is deleted
* Use tsserver tests instead of fourslash tests to ensure session is used
* Support find-all-references
* Restore fourslash tests
* Update emit baselines (added missing newline)
* Support rename
* @weswigham code review
* Don't open/close files
* Avoid growing `toDo` too eagerly
* @sheetalkamat code review
* Also get symlinked projects for originalLocation
* Update API (#24966 )
* More @sheetalkamat code review
* Remove unnecessary test
* Update API (#24966 )
2018-07-05 15:39:03 -07:00