Gabriela Araujo Britto
e3a465ffa3
change startPosition and endPosition to leadingTriviaOption and trailingTriviaOption
2019-02-26 09:43:35 -08:00
Gabriela Araujo Britto
365967d484
Merge branch 'master' into convert-to-named-parameters
2019-02-25 10:54:58 -08:00
Joseph Wunderlich
d87e67df58
clarify intent in returnType creation
2019-02-22 18:00:21 -08:00
Joseph Wunderlich
21ab39649c
remove any annotation from declare method quickfix
2019-02-22 17:24:21 -08:00
Gabriela Araujo Britto
ce42aa43a8
check usages of class if refactoring a constructor
2019-02-22 16:31:40 -08:00
Gabriela Araujo Britto
6b53489a4a
Merge branch 'master' into convert-to-named-parameters
2019-02-20 13:24:09 -08:00
Gabriela Araujo Britto
e40442d46a
minor refactors
2019-02-20 11:13:04 -08:00
xiaofa
7c8c6cf4d0
fix no space before equal operator in type parameter
2019-02-20 18:12:09 +08:00
Gabriela Araujo Britto
17b89653c2
include trailing trivia after expression in getAdjustedEndPosition if endPosition is include
2019-02-19 14:20:37 -08:00
Gabriela Araujo Britto
78968b1281
don't provide refactor in js file
2019-02-19 09:10:27 -08:00
Gabriela Araujo Britto
a773046181
copy argument comments to property
2019-02-15 16:48:54 -08:00
Gabriela Araujo Britto
b6c8382c78
replace argument list instead of whole call when refactoring
2019-02-15 15:51:20 -08:00
Gabriela Araujo Britto
eef3da5b6b
create new ConfigurableStart and ConfigurableEnd options and rename them
2019-02-15 15:38:10 -08:00
Gabriela Araujo Britto
05e9d6c9de
fix reference checking
2019-02-13 15:34:18 -08:00
Gabriela Araujo Britto
ec0e734708
return function expression name in getFunctionDeclarationNames
2019-02-13 11:36:59 -08:00
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
Ron Buckton
61d13b740e
Merge pull request #29726 from bmeurer/modifierFlagsCache
...
Make modifierFlagsCache mandatory for Node objects
2019-02-07 12:13:46 -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
Jesse Trinity
7fd1e62a63
accepted new baselines
2019-02-06 14:37:26 -08:00
Jesse Trinity
f0a6154e9b
Added auto setting to quotePreference
2019-02-06 14:37:26 -08:00
Benedikt Meurer
0c7a7df09d
Also initialize transformFlags properly in NodeObjects.
2019-02-06 20:57:02 +01:00
Benedikt Meurer
fb65adbd23
Fix initialization of TokenOrIdentifierObject#transformFlags.
...
This should start with `TransformFlags.None` just like in the `Node`
constructor in `src/compiler/utilities.ts`.
2019-02-06 16:51:32 +01:00
Gabriela Britto
674800f25e
implement refactor for functions with a rest parameter
2019-02-04 12:52:27 -08:00
Benedikt Meurer
97c557eb04
Make modifierFlagsCache mandatory for Node objects
...
The `modifierFlagsCache` property is among the top properties that cause
megamorphic stub cache misses when having `tsc` build itself. This is
because it's added sort of randomly to a whole lot of different objects,
at arbitrary points after their initialization.
This also means that `modifierFlagsCache` is often not present on the
instances, which means that when missing on the megamorphic stub cache,
Node/V8 has to compute `NonExistent` handlers for the relevant inline
caches.
It's a lot cheaper to just make sure that the property is always
existent on the instance, and ideally also at the same offset. This
change ensures exactly that.
Drive-by-fix: Also make sure that `transformFlags` (and `parent`)
is always at the same offset for `Node` objects.
2019-02-04 14:46:27 +01: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