Wesley Wigham
0d7d75ec64
Add formatting rule for import type import keyword and open paren ( #23872 )
2018-05-03 14:57:01 -07:00
Andy
406ca06e8e
Fix bug: JSDocPropertyTag is a declaration ( #23876 )
2018-05-03 14:19:15 -07:00
Andy
38016f9300
Implement feedback on "Improve completions testing" ( #23842 )
2018-05-03 13:04:08 -07:00
Andy
bad3a44bb2
In insertNodeAfter, handle file with no trailing newline ( #23814 )
2018-05-03 12:58:42 -07:00
Ron Buckton
56648ad0f1
Merge pull request #20763 from Microsoft/vfs
...
Update harness to use single robust virtual file system for tests.
2018-05-03 10:25:20 -07:00
Andy
724e656acb
Don't show a definition at a 'require' call ( #23822 )
2018-05-03 08:02:56 -07:00
Andy
306418e171
fixAddMissingMember: Add a new PropertyDeclaration at the end of the first set ( #23837 )
2018-05-02 15:42:05 -07:00
Ron Buckton
66c11c527a
Update completion order in test
2018-05-02 10:51:09 -07:00
Ron Buckton
d62a11ffc0
Merge branch 'master' into vfs
2018-05-01 18:58:31 -07:00
Andy
333b8ff028
Fix typo: || should be parenthesized ( #23811 )
2018-05-01 14:59:58 -07:00
Andy
a1f9a4fb24
fixCannotFindModule: Special handling for node core modules like "fs" ( #23807 )
...
* fixCannotFindModule: Special handling for node core modules like "fs"
* Hardcode @types/node
2018-05-01 14:33:42 -07:00
Andy
9f4abe2d79
Improve completions testing ( #23591 )
2018-05-01 13:00:13 -07:00
Andy
cee4289f58
Add code fix to convert 'require' in a '.ts' file to an 'import' ( #23711 )
...
* Add code fix to convert 'require' in a '.ts' file to an 'import'
* Only add suggestion for modules
* Revert "Only add suggestion for modules"
This reverts commit b1a728fdac .
2018-05-01 09:24:02 -07:00
Nathan Shively-Sanders
7cda045d52
Always export typedefs ( #23723 )
...
* Always export typedefs
This actually just required deleting a check in declareModuleMembers
and checking for external AND commonjs modules in a couple of places.
However, while experimenting with this feature, I discovered that even
previously-exported typedefs would only be exported if they came after a
commonjs export node. So I added a commonjs check to the pass in the
parser. It will not catch nested module.exports, but it will catch
top-level assignments.
The new test tests both changes.
* Post-bind typedef instead of pre-checking for commonjs
* Duplicate identifier errors
* Fix class type reference resolution+update baselines
* Move to a type-based check for duplicate identifiers
2018-04-30 14:55:26 -07:00
Mohamed Hegazy
8793b8c56b
Merge pull request #23697 from Ken703/bug/23047
...
Formatting: fix unwanted space between closing parenthesis and string template
2018-04-30 10:19:17 -07:00
Ken703
4e401ca361
update string template rule and test
2018-04-28 19:59:41 -04:00
Ron Buckton
4863d55d01
Merge branch 'master' into vfs
2018-04-27 14:03:42 -07:00
Andy
aa102435b3
Fix insertNodeAtClassStart for empty class with comment ( #23342 )
2018-04-26 08:00:38 -07:00
Ken703
d9bc436788
Auto format: no space between closing parenthesis and string template
2018-04-25 21:10:35 -04:00
Andy
cdfd92b90d
Don't add import completion from a re-export in "./index" ( #23623 )
...
* Don't add import completion from a re-export in "./index"
* Simpler heuristic
2018-04-25 16:15:49 -07:00
Andy
5280d23b63
importNameCodeFix: consistently put fixes to use existing imports before fixes for existing imports ( #23663 )
2018-04-25 08:04:20 -07:00
Andy
59765e2d86
goToDefinition: Also add definitions for symbol if it does not match the signature symbol ( #23657 )
2018-04-24 09:41:47 -07:00
Andy
eca17ac243
Support import fix even when the error is that a type is used as a value ( #23655 )
2018-04-24 08:54:14 -07:00
Ron Buckton
bb26ab5556
Merge branch 'master' into vfs
2018-04-23 22:48:48 -07:00
Andy
fc30bd10e3
Suggestion to convert to ES6 module should only trigger in projects which express some intent to use ES6 ( #23576 )
2018-04-23 16:05:37 -07:00
Nathan Shively-Sanders
905f9a02ad
module.exports = Entity is an alias, just like export = Entity (#23570 )
...
* Make `module.export =` an alias like `export=` is
This breaks a couple of tests for previous workarounds. Fix in upcoming
commits.
* Basically fixes all the breaks, but needs cleanup
* More notes to myself
* Clean up TODOs
* Call mergeSymbolTable and delete export= afterward
instead of basically copying the code myself.
* More cleanup
* Remove unnecessary check in import type checking
* Revert to DIY code.
It is more correct and will go away in a few days.
* Exported class expressions can be used as type
In both JS and TS
* Do not require named class expressions
2018-04-23 15:24:31 -07:00
Andy
222f35d927
Make symbol display at ExportSpecifier use 'export', not 'import' ( #23629 )
2018-04-23 13:29:14 -07:00
Andy
645258cc7d
Allow getting import completion details with misspelled name ( #23624 )
2018-04-23 11:24:51 -07:00
Andy
2e78d1ef21
getEditsForFileRename: Update tsconfig "files" ( #23625 )
2018-04-23 11:11:06 -07:00
Andy
5c94bef0e1
Add 'renameFile' command to services ( #23573 )
...
* Add 'renameFile' command to services
* renameFile -> getEditsForFileRename
* Support `<reference path>` directives
2018-04-20 13:43:09 -07:00
Andy
22f2b118b7
Add 'triggerCharacter' option for completions requests ( #23491 )
...
* Add 'triggerCharacter' option for completions requests
* mhegazy code review
* More code review
* Handle '<' in comment
2018-04-20 10:25:58 -07:00
Andy
94cc59ca60
Support getting JSDoc comment starting at a FunctionType node ( #23546 )
...
* Support getting JSDoc comment starting at a FunctionType node
* Move || to end of line
2018-04-20 09:43:20 -07:00
Ron Buckton
370107ed7b
Merge branch 'master' into vfs
2018-04-19 16:55:35 -07:00
Nathan Shively-Sanders
8d969a23cb
In JS, class supports @template tag for declaring type parameters ( #23511 )
...
* Support @template as a class type parameter
Still need to do the following:
1. Correctly get jsdoc host in predicate.
2. Make this work for constructor functions too.
3. Scan rest of codebase for other usages of the type parameters
property that should be calls to getEffectiveTypeParameterDeclarations.
4. Rename tp to something more readable, like typar or ts'.
* Use jsdoc host declaration to find container
* Longer names for type parameters
* Fix renaming operation
* Update fourslash test
* Support @template for JS constructors
* Look for both outer and tag type parameters
* Improve naming to improve code clarity
2018-04-19 15:58:43 -07:00
Andy
a7c08e4691
Make code fix to add 'this.' work for statics ( #23527 )
...
* Make code fix to add 'this.' work for statics
* Add 'C.' instead of 'this.'
* DanielRosenwasser code review
2018-04-19 15:39:44 -07:00
Andy
c258d6e1b6
Fix bug: Don't rename 'default' in export { default as x } from "m"; ( #23434 )
...
* Fix bug: Don't rename 'default' in `export { default as x } from "m";`
* Rename `foo` in `{ default as foo }` if that's the original export name
2018-04-19 15:35:25 -07:00
Andy
bc7979c174
quickInfo: Get JSDoc tags from aliased symbol ( #23526 )
...
* quickInfo: Get JSDoc tags from aliased symbol
* Add test with existing tags
2018-04-19 15:33:36 -07:00
Andy
f5101e21c3
Find-all-references: Don't crash on 'typeof import' ( #23448 )
...
* Find-all-references: Don't crash on 'typeof import'
* Move `| ImportTypeNode` out of `AnyImportOrReExport`
2018-04-17 15:01:36 -07:00
Ron Buckton
1cbe930e06
Merge branch 'master' into vfs
2018-04-17 14:39:20 -07:00
Andy
d1fde3786c
Symbol kind for a method on a mapped type should still be 'method' ( #23478 )
2018-04-17 14:07:59 -07:00
Andy
b00e370605
Add '?' in quick info for optional properties/methods ( #23480 )
2018-04-17 12:42:23 -07:00
Benjamin Lichtman
48f98bdd4d
Merge pull request #23452 from uniqueiniquity/normalizeDocumentHighlightsPaths
...
Normalize document highlights paths
2018-04-17 12:31:00 -07:00
Andy
e50b24a83b
convertFunctionToEs6Class: Copy comment from variable declaration ( #23445 )
2018-04-17 09:15:05 -07:00
Andy
55f9a6ffc2
Fix bug: VariableDeclaration initiazer may be undefined ( #23439 )
2018-04-17 08:59:07 -07:00
Andy
bc285aa9a1
findAllReferences: Mark *every* search symbol as seen, not just search.symbol ( #23451 )
2018-04-17 07:53:43 -07:00
Andy
40fd6aebdc
Shrink span for convert-to-es6-module suggestion ( #23441 )
2018-04-16 16:46:27 -07:00
Benjamin Lichtman
221ac50c4c
Merge pull request #23437 from Microsoft/getOutliningSpansDepthElseIf
...
In outliningElementsCollector, treat 'else if' as having same depth as the 'if'
2018-04-16 16:25:57 -07:00
uniqueiniquity
e9d6f788ca
Add test
2018-04-16 15:59:22 -07:00
Andy
aac9ef5e51
convertToEs6Module: Avoid replacing entire function ( #22507 )
...
* convertToEs6Module: Avoid replacing entire function
* Code review
* Fix typo
2018-04-16 13:16:04 -07:00
Andy Hanson
a60caba467
In outliningElementsCollector, treat 'else if' as having same depth as the 'if'
2018-04-16 11:33:30 -07:00