Commit Graph

10159 Commits

Author SHA1 Message Date
Jesse Trinity
86122c412f convert get set test 2020-05-29 12:55:52 -07:00
Jesse Trinity
673a86833a update test names 2020-05-29 12:55:48 -07:00
Jesse Trinity
3825d193f6 extract symbol test 2020-05-29 12:55:43 -07:00
Jesse Trinity
df8ff659c5 extract type test 2020-05-29 12:55:39 -07:00
Jesse Trinity
85e0d8b14a add refactorNotAvailableForTriggerReason 2020-05-29 12:55:35 -07:00
Jesse Trinity
dc363f10fc fix some indices 2020-05-29 12:55:32 -07:00
Jesse Trinity
fbf6737ae2 use verify trigger reason for import export 2020-05-29 12:55:28 -07:00
Jesse Trinity
96f210c1c8 arrow function refactor test 2020-05-29 12:55:24 -07:00
Jesse Trinity
f3751fbdf3 change type of RefactorTriggerReason 2020-05-29 12:54:59 -07:00
Jesse Trinity
665e434832 convert import tests 2020-05-29 12:50:18 -07:00
Jesse Trinity
57e856b0b4 convert export tests 2020-05-29 12:50:14 -07:00
Jesse Trinity
c5343f1d4e update refactorConvertImport_partialSelection 2020-05-29 12:46:03 -07:00
Daniel Rosenwasser
6128f30c3b Merge pull request #38821 from a-tarasyuk/bug/23716
fix(23716): signature help of tagged template doesn't show instantiated signature
2020-05-28 17:19:23 -07:00
Nathan Shively-Sanders
bfa1744586 Merge pull request #37894 from microsoft/always-error-on-property-override-accessor
Always error on property override accessor
2020-05-26 10:37:07 -07:00
Alexander T
6e98431cec fix(23716): show generic type in tagged template expression 2020-05-26 19:16:44 +03:00
Nathan Shively-Sanders
324d292e3d Merge pull request #38415 from Kingwl/navTree-fix
Fix trancked es5 classes after new scope
2020-05-26 09:05:17 -07:00
Anders Hejlsberg
c5b8f4fcd4 Fix relation between generic mapped types and types with index signatures (#38761)
* Fix relation between generic mapped type and type with index signature(s)

* Add tests
2020-05-25 09:55:41 -07:00
Nathan Shively-Sanders
e466bb94c1 Fix multi-file usage
1. Follow aliases with getSupers.
2. Make fix in file with superclass, not with the error.
2020-05-22 09:06:05 -07:00
Nathan Shively-Sanders
802e87b1eb Merge branch 'master' into always-error-on-property-override-accessor 2020-05-21 16:08:09 -07:00
Daniel Rosenwasser
62675a58d6 Merge pull request #38481 from a-tarasyuk/bug/38463
fix(38463): No indexed access completions after Record<...>
2020-05-21 13:44:44 -07:00
Alexander T
c00aeb5486 fix(33286): add outlining for arrow function with one parameter (#38631) 2020-05-21 08:07:47 -07:00
Alexander T
e40a2bca57 Merge branch 'master' of https://github.com/microsoft/TypeScript into bug/38463 2020-05-21 16:33:35 +03:00
Nathan Shively-Sanders
fc83d10388 Merge branch 'master' into diagnose-accidental-accessor-call 2020-05-20 16:46:34 -07:00
Nathan Shively-Sanders
3340142dda Merge pull request #38607 from a-tarasyuk/bug/38295
fix(38295): Duplicated object key in const not detected when the key is a number preceded by `-` or `+`
2020-05-20 14:52:09 -07:00
Alexander T
4e945fbc98 fix(38299): use string literals as keys to creating rest result (#38600) 2020-05-20 13:52:52 -07:00
Anders Hejlsberg
a56960303d Intersection check for empty object type shouldn't cause circularities (#38673)
* isEmptyAnonymousObjectType shouldn't require full member resolution

* Add regression test
2020-05-20 10:56:14 -07:00
Alexander T
bbf56b044b Merge branch 'master' of https://github.com/microsoft/TypeScript into bug/38295 2020-05-20 20:13:50 +03:00
Alexander T
e04ab6938a fix(38295): handle duplicate object literal keys which contain '+' and '-' tokens 2020-05-20 14:32:41 +03:00
Alexander T
528d82afd1 Merge branch 'master' of https://github.com/microsoft/TypeScript into bug/38463 2020-05-20 11:04:55 +03:00
Alexander T
1c72da6e49 fix(38463): show completions for index access properties 2020-05-20 10:17:20 +03:00
Wesley Wigham
5f597e69b2 Support naming tuple members (#38234)
* Initial draft of named tuple members

* Show tuple labels and documentation in completions

* Swap allowed syntax to parameter-like

* Add quickfix for labeled tuple syntax mistakes

* Add refactoring to convert list of signatures to single overload

* Fix small bug in visitor verification

* Signature help for rest parameters which are unions of tuples are displayed as seperate entries now

* Expand sanity check test cases in conformance suite

* Add tests and code for preserving tuple names through spreads where possible

* More refactoring tests, some comment preservation and some fixed formatting of multiline tuples

* Handle missing parameter named in isValidDeclarationForTupleLabel

* Minor text fixes
2020-05-19 15:54:02 -07:00
Jack Works
7ec467e270 fix: extract const in jsx (#37912)
* fix: extract const in jsx

* Update src/services/refactors/extractSymbol.ts

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

* Update src/services/refactors/extractSymbol.ts

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2020-05-19 14:29:49 -07:00
Nathan Shively-Sanders
415b2e7969 Merge pull request #38656 from a-tarasyuk/bug/33233
fix(33233): Code Folding on es5 object functions does not work (getOutliningSpans)
2020-05-19 14:18:42 -07:00
Anders Hejlsberg
7ba0a6592d No contextual types from circular mapped type properties (#38653)
* No contextual types from circular mapped type properties

* Add regression test
2020-05-19 13:42:30 -07:00
Andrew Branch
707e977056 Ensure formatter can always get a newline character (#38579)
* Ensure formatter can always get a newline character

* Make FormatContext.host optional since it’s not necessary if format options are all applied

* Make FormattingHost required again
2020-05-19 13:14:32 -07:00
Alexander T
2b703d254a fix(33233): add outlining for comments before property access expression 2020-05-18 15:26:46 +03:00
Anders Hejlsberg
3c1f37e913 Use control flow analysis to check 'super(...)' call before 'this' access (#38612)
* Use CFA graph to check this/super accesses are preceded by super() call

* Accept cleaned-up API baselines

* Accept new baselines

* Add tests
2020-05-16 19:58:17 -07:00
Eli Barzilay
33c3e9e2c6 Make processTaggedTemplateExpression visit a returned node
This problem was introduced in 70399e146e (from PR #23801), which added
a `visitTaggedTemplateExpression` case for `TaggedTemplateExpression`,
before that, it would fallback to the default of `visitNode`.  So re-add
that happen in `processTaggedTemplateExpression`.

Since it doesn't hurt, I left a `Debug.checkDefined(property.name)`
instead of `!`-ing it.

Fixes #38558.
2020-05-15 19:46:45 -04:00
Eli Barzilay
d7dd06e36d goToDefinition: find only the value if it's the RHS of an assignment 2020-05-15 18:55:57 -04:00
Ron Buckton
1cbe7ef000 Fix crash in JS declaration emit (#38508)
* Fix crash in JS decl emit

* Emit as class with private ctor
2020-05-15 14:00:59 -07:00
Wesley Wigham
7fc456f2d7 Include unknown in spread prop override check (#38577) 2020-05-14 14:36:38 -07:00
Anders Hejlsberg
c1f676dd3f Perform intersection reduction before and after getApparentType (#38565)
* Perform intersection reduction before and after getApparentType

* Add regression tests
2020-05-13 20:57:17 -07:00
Alexander T
71711257ea fix(33836): allow readonly modifier for a field with only get accessor (#36543) 2020-05-13 13:28:32 -07:00
Daniel Rosenwasser
b682ee1a8a Merge pull request #38489 from microsoft/removeDuplicateInfo
Remove duplicate JSDoc comments
2020-05-12 12:52:15 -07:00
Nathan Shively-Sanders
3f06adf662 Merge pull request #38240 from a-tarasyuk/feat/add-outlining-spans-for-object-destructuring-elements
feat: Add outlining spans for object destructuring elements
2020-05-12 07:35:03 -07:00
Nathan Shively-Sanders
cbf15bb6ed feat(38225): change diagnostic message for remove braces from arrow function body (#38226) 2020-05-12 07:27:09 -07:00
Alexander T
5895493815 fix(37877): include in NavigationBar default exported child items (#38255) 2020-05-12 07:26:31 -07:00
Ron Buckton
d07e866a28 Fix for jsdoc modifiers on constructor params (#38403)
* Fix for jsdoc modifiers on constructor params

* Update Public API baseline and fix unique symbol grammar check for js
2020-05-11 15:07:43 -07:00
Daniel
1450908e5c Added tests for union types with identical doc comments. 2020-05-11 21:36:43 +00:00
Wenqi
1b7b3eb0f7 report error for duplicate @type declaration (#38340) 2020-05-11 12:47:49 -07:00