Gabriela Araujo Britto
ef4db31e84
don't apply changes when unexpected reference is found
2019-02-13 11:35:44 -08:00
Gabriela Araujo Britto
dbd84996aa
don't apply refactor when parameter has decorators
2019-02-11 14:24:05 -08:00
Gabriela Araujo Britto
dba631de80
copy comments when refactoring
2019-02-11 12:02:51 -08:00
Gabriela Araujo Britto
26f8ddd46a
create functions for copying trailing comments and rename previous copyComment function
2019-02-11 12:01:02 -08:00
Gabriela Britto
7d86fda151
fix hasThisParameter to check for parameters length
2019-02-06 16:06:46 -08:00
Gabriela Britto
9270e58eaf
Merge branch 'master' into convert-to-named-parameters
2019-02-06 15:41:16 -08:00
Gabriela Britto
b87392c22c
fix duplication of leading and trailing comments on refactored function
2019-02-06 15:40:58 -08:00
Gabriela Britto
18b2b55387
add option to suppressLeadingAndTrailingTrivia non recursively
2019-02-06 15:38:59 -08:00
Gabriela Britto
674800f25e
implement refactor for functions with a rest parameter
2019-02-04 12:52:27 -08:00
Gabriela Britto
bde97d1226
fix refactor to find super references
2019-02-01 16:43:44 -08:00
Ryan Cavanaugh
a856a64a5c
Merge pull request #29446 from fuafa/infer-js-doc
...
fix quick fix infer parameter types from usage in js file
2019-02-01 13:55:31 -08:00
Gabriela Britto
bf25ba4650
Don't refactor if variable declaration has type annotation
2019-02-01 13:09:53 -08:00
Benjamin Lichtman
62cf44cb9b
Allow per-file setting for rename default behavior preferences ( #29593 )
...
<!--
Thank you for submitting a pull request!
Here's a checklist you might find useful.
* [ ] There is an associated issue that is labeled
'Bug' or 'help wanted' or is in the Community milestone
* [ ] Code is up-to-date with the `master` branch
* [ ] You've successfully run `jake runtests` locally
* [ ] You've signed the CLA
* [ ] There are new or updated unit tests validating the change
Refer to CONTRIBUTING.MD for more details.
https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
-->
Fixes #29585 .
#29314 and #29385 made it so their respective settings are only recognized when provided to the host as a whole.
This PR makes it so that the relevant settings for the preferences on the file override those of the preferences on the host.
2019-01-30 19:08:30 -08:00
Gabriela Britto
1d94322ea0
preserve this parameter when refactoring
2019-01-29 16:44:30 -08:00
Gabriela Britto
9e62eb9fb4
Merge branch 'master' into convert-to-named-parameters
2019-01-28 16:00:47 -08:00
Gabriela Britto
3243b4b4f2
Refactor direct function calls
2019-01-28 15:52:44 -08:00
Gabriela Britto
f3e60be8b1
Move function getTypeNodeIfAccessible from inferFromUsage to utilities
2019-01-28 15:51:24 -08:00
xiaofa
ddbac8f3fe
get appropriate parent jsdoc node for arrow functions
2019-01-26 23:59:32 +08:00
Sheetal Nandi
73fe3fc0f5
Merge pull request #29532 from Microsoft/umdModuleGlobalMerge
...
Handle find all references for symbol merged with UMD module and global var
2019-01-23 11:13:58 -08:00
Sheetal Nandi
d42185373a
PR feedback
2019-01-23 10:48:17 -08:00
Ron Buckton
76b78a4df5
Fix crash in signatureHelp
2019-01-22 15:02:30 -08:00
Sheetal Nandi
f0227ecb2c
Handle find all references for symbol merged with UMD module and global var
...
Fixes #29093
2019-01-22 14:52:39 -08:00
Gabriela Britto
919ed79f3a
implement new parameter creation
2019-01-18 16:49:11 -08:00
Andrew Casey
737fda928c
Don't treat interfaces as implementations
...
...even if they're in ambient contexts. Same for type aliases.
2019-01-17 15:45:01 -08:00
Andrew Casey
94ca50177a
Merge pull request #29451 from amcasey/GH27937
...
Consider JSX namespace imports when moving statements between files
2019-01-17 10:19:02 -08:00
Andrew Casey
3e256e14dc
Add fourslash tests
2019-01-16 19:18:25 -08:00
Andrew Casey
7102de77d3
Consider JSX namespace imports when moving statements between files
...
Each of the old and new files should end up with a JSX namespace import
iff it contains JSX.
Fixes #27939
2019-01-16 18:55:27 -08:00
Gabriela Britto
705ac60a59
WIP
2019-01-16 15:49:09 -08:00
xiaofa
c9c9f859f3
fix quick fix infer parameter types from usage in js file
2019-01-17 05:51:57 +08:00
Benjamin Lichtman
5fc8f1dd80
Add opt-in user preference for prefix and suffix text on renames ( #29314 )
...
* Add user preference to control renaming through exports
* Only impact renaming
* Update baselines
* Use flag to control all prefix and suffix text and imports
* [WIP] add tests
* Only skip export import specifier with flag
* [WIP] Update tests
* Update test
* Pick up preference from host and update test
* Shorten flag name
* Add missing utility function
* Update comment
* [WIP] rename flag and respond to cr
* [WIP] Add flag for forRelatedSymbol
* Use larger search symbol set for old-style rename
* Respond to CR
* Fix small error
* Fix type mismatch
* Update comment and remove unnecessary exprot
* Respond to CR
2019-01-16 10:58:07 -08:00
Gabriela Britto
9aeeae54b0
create refactoring for converting to named parameters
2019-01-15 16:56:53 -08:00
Benjamin Lichtman
c5948bf068
Merge pull request #29385 from uniqueiniquity/renameImportPref
...
Add user preference to opt-in to renaming import paths
2019-01-15 10:29:57 -08:00
Benjamin Lichtman
2c50ed3089
Respond to CR
2019-01-14 17:05:25 -08:00
Sheetal Nandi
d53619a30d
Merge pull request #29418 from Microsoft/exportEquals
...
Handle generating action for export equals with anonymous symbol
2019-01-14 16:12:32 -08:00
Sheetal Nandi
6e54cbdaff
Handle generating action for export equals with anonymous symbol
...
Fixes #28845
2019-01-14 15:32:13 -08:00
Wesley Wigham
3d2bf6a75f
Fix implement interface quickfix import types ( #29410 )
...
* Pass module specifier resolution host thru types constructed by implements quickfixes
* Add regression test
* Fix scope node for generated methods, fix lints
2019-01-14 13:56:27 -08:00
Benjamin Lichtman
d029fae35c
Add user preference to opt-in to renaming import paths
2019-01-11 14:45:08 -08:00
Josh Goldberg
7b6adae6dd
Extracted compilerOptions setting to helper function
2019-01-11 15:05:24 -05:00
Josh Goldberg
8d28f9230c
Added codefix to enable experimentalDecorators in the user's config file
...
Starts on #29035 by creating a codefix to enable the `experimentalDecorators` setting in a user's config file, if one exists. The issue's discussion also mentions giving a more precise error message if the user has a jsconfig or tsconfig or creating one if not; I'd rather tackle those in separate PRs to keep this one small.
Doesn't create the code action if no config file is present. Otherwise keeps to the precedent of returning without action when the config file contents aren't the expected JSON structure (looking at `fixCannotFindModule.ts`). Moves a couple JSON helpers from that file into the sibling `helpers.ts` so both codefixes can use them.
2019-01-11 09:20:12 -05:00
Sheetal Nandi
387be1fffa
Merge pull request #29316 from Microsoft/randomIdentifier
...
Verify that completion with new identifier location returns isNewIdentifierLocation: true
2019-01-09 13:01:22 -08:00
Sheetal Nandi
46482e14a4
Verify that completion with new identifier location returns isNewIdentifierLocation: true
...
Fixes #24009
Signed-off-by: Sheetal Nandi <shkamat@microsoft.com >
2019-01-08 16:21:46 -08:00
Sheetal Nandi
08f738fc42
There is no need to check for file presence when trying to rename imports based on file rename
...
Fixes #29031
2019-01-08 15:18:52 -08:00
Sheetal Nandi
93249db692
Use the sourceFile to determine the jsxNamespace at the location for organizingImports
...
Fixes #28827
2019-01-04 14:12:04 -08:00
Sheetal Nandi
d35ea02cc6
Merge pull request #29247 from ajafff/organizeimports-crash
...
Fix crash in organizeImports
2019-01-03 08:54:34 -08:00
Klaus Meinhardt
6a9ad0e2eb
Fix crash in organizeImports
...
Fixes : #29236
2019-01-03 16:20:46 +01:00
Benjamin Lichtman
799656a037
Merge pull request #29214 from uniqueiniquity/nestedAsyncCodeFix
...
Only provide suggestion for outermost async fix
2018-12-31 17:18:39 -08:00
Benjamin Lichtman
11585d29bc
Merge pull request #29218 from uniqueiniquity/jsdocSpanForVarStatement
...
Jsdoc span for var statement
2018-12-31 16:27:34 -08:00
Benjamin Lichtman
cb57f17aba
Simplify approach
2018-12-31 16:25:26 -08:00
Benjamin Lichtman
28e68a6891
Fix spelling of convertible
2018-12-31 16:00:24 -08:00
Benjamin Lichtman
048d04684b
use existing util functions
2018-12-31 15:56:54 -08:00