Commit Graph

8752 Commits

Author SHA1 Message Date
Andrew Casey
3e256e14dc Add fourslash tests 2019-01-16 19:18:25 -08:00
Wesley Wigham
41a7bf4b73 Fake up value declaration for synthetic jsx children symbol so they get excess property checked (#29359) 2019-01-15 22:31:57 -08:00
Daniel Rosenwasser
9cd5f2dd3c Add regression test. (#29433) 2019-01-15 17:39:02 -08:00
Wesley Wigham
49689894d7 Elaborate jsx children elementwise (#29264)
* Heavy WIP, but has good contextual typing fix

* Add arity error, refine messages and spans

* Small error message change

* Better error messages, text-specific message
2019-01-15 11:32:36 -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
Ron Buckton
5763e2c3d4 Remove overzealous simple relationship check for unique symbols 2019-01-14 17:08:04 -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
Wesley Wigham
dc0f4afe5e Save & recalculate declare flag modifier on late printed statements (#29412)
* Save & recalculate declre flag modifier on late printed statements

* Accept related baseline updates
2019-01-14 13:53:04 -08:00
Sheetal Nandi
d4055a3234 Merge pull request #26017 from ajafff/rest-param-destructuring
allow BindingPattern in FunctionRestParameter
2019-01-14 10:58:19 -08:00
Gabriela Britto
e5708e1903 Merge pull request #29352 from Microsoft/qualified-name-param-tag-error
Qualified name param tag error
2019-01-14 10:28:08 -08:00
Benjamin Lichtman
d029fae35c Add user preference to opt-in to renaming import paths 2019-01-11 14:45:08 -08:00
Sheetal Nandi
9f19c06dbf Merge pull request #29372 from JoshuaKGoldberg/codefix-enable-decorators
Added codefix to enable experimentalDecorators in the user's config file
2019-01-11 12:45:28 -08: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
Martin Probst
f3f5877c5f Add tests for noLib with <reference lib> and bundling. 2019-01-11 09:02:49 +01:00
Martin Probst
cc7ddaed28 Add tests for noLib with <reference lib>. 2019-01-11 09:02:49 +01:00
Gabriela Britto
b3633fab52 Add more tests for qualified name param without top level object error 2019-01-10 15:04:16 -08:00
Wesley Wigham
aba0b700b6 Allow circular umd-merged-with-augmentation refs to resolve to the module as intended (#29335) 2019-01-10 14:48:15 -08:00
Wesley Wigham
76f444e338 Allow nonnull assertions in references (#29351) 2019-01-10 14:45:19 -08:00
Gabriela Britto
ebe193c6d7 Minor refactor in paramTagNestedWithoutTopLevelObject.ts 2019-01-10 14:05:10 -08:00
Gabriela Britto
e2524e3750 Add test for qualified name param without top level object error 2019-01-10 09:55:06 -08:00
Anders Hejlsberg
52b82560e8 Merge pull request #29338 from Microsoft/fixConditionalTypeResolution
Fix conditional type resolution
2019-01-09 17:18:12 -08:00
Anders Hejlsberg
9fda7014ca Add regression tests 2019-01-09 16:16:24 -08:00
Wesley Wigham
d0aff9bdcd Fix crash (#29333) 2019-01-09 14:23:57 -08: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
Daniel Rosenwasser
6bfb935929 Merge pull request #25445 from a-tarasyuk/bug/24542-bad-error-message-for-import-ing-an-export
24542 - bad error message for `import *`-ing an `export=`
2019-01-09 11:02:14 -08:00
Klaus Meinhardt
b52a7fc3ea Exclude JSDoc @extends from 'super()' checks (#29308)
* Exclude JSDoc @extends from 'super()' checks

This fixes a similar problem as #29244 where JSDoc `@extends`

* fix check 'super can only be referenced in a derived class'
2019-01-09 10:35:22 -08:00
Sheetal Nandi
3f5c0b81a3 Fix existing test 2019-01-09 10:28:53 -08:00
Wesley Wigham
19c72c758a Allow untyped calls on unions of untyped things (#29265) 2019-01-08 11:05:55 -08:00
Alexander T
52057ac4f6 Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/24542-bad-error-message-for-import-ing-an-export 2019-01-08 10:55:11 +02:00
Martin Probst
7a2b2cebbf Do not emit code for @extends tags in JS. (#29244)
When transpiling JavaScript, TS3.1+ emits `@extends` tags as code. E.g.

    /** @extends {SuperClass} */
    class SubClass {}

Causes an ES5 emit that references SuperClass:

    /**
    * @extends {SomeBase}
    */
    var SubClass = /** @class */ (function (_super) {
        __extends(SubClass, _super);
        function SubClass() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return SubClass;
    }(SomeBase));

Note the literal references to `SomeBase`.

This appears to be an accidental effect of 0f55566cf4. It refactored
`getEffectiveBaseTypeNode` for type checking, but missed an instance
where it is also used for emit logic. This change fixes the problem by
specifically getting the heritage clauses directly off the AST.

Change-Id: I3128a757e5924e2528c61230a90ac13650852542
2019-01-04 08:13:14 -08:00
Sheetal Nandi
d8ee4116ef Fix function declaration without body to be checked as context sensitive
Fixes #29032
2019-01-03 12:46:39 -08:00
Klaus Meinhardt
66314e1f85 Merge branch 'master' of github.com:Microsoft/TypeScript into rest-param-destructuring 2019-01-03 17:45:17 +01: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
aebcb6df36 Merge pull request #29216 from uniqueiniquity/multilineArgumentSpans
Give appropriate outlining span for array and object literals as args in call expression
2018-12-31 15:18:07 -08:00
Benjamin Lichtman
bb2f300191 Add test 2018-12-31 15:15:47 -08:00
Benjamin Lichtman
a266131928 Add test 2018-12-31 14:43:56 -08:00
Benjamin Lichtman
adcb278272 Add test 2018-12-31 14:11:08 -08:00
Daniel Rosenwasser
0dbb9760c0 Merge pull request #29147 from Kingwl/type_query_completions
fix typeof completions broken
2018-12-31 10:36:39 -08:00
Anders Hejlsberg
beebda3574 Merge pull request #29110 from Microsoft/fixDiscriminantCheck
Fix discriminant property check
2018-12-30 17:46:01 -10:00
Anders Hejlsberg
8570a67572 Merge pull request #29121 from Microsoft/mappedTypeConstraints
Improve constraints for non-homomorphic mapped types
2018-12-30 17:44:41 -10:00
Anders Hejlsberg
fd3af78b8b Merge pull request #29179 from Microsoft/typeParameterDefaultForwardReference
No self or forward references in type parameter defaults
2018-12-30 17:43:57 -10:00
Anders Hejlsberg
8e1403144d Merge pull request #29192 from Microsoft/initializerWidening
Fix initializer widening
2018-12-28 17:15:36 -10:00
Anders Hejlsberg
7f4d1ac475 Add regression test 2018-12-28 09:38:19 -10:00
Benjamin Lichtman
c46090b8dc Show template literal in navtree function call args 2018-12-27 17:43:56 -08:00
Anders Hejlsberg
a400a8afec Add regression test 2018-12-27 14:05:14 -10:00
王文璐
7c93affd7d fix typeof completions broken 2018-12-25 17:30:04 +08:00
Anders Hejlsberg
7ad2661625 Add tests 2018-12-21 12:51:01 -08:00
Anders Hejlsberg
3e93461fc8 Add regression test 2018-12-20 07:21:49 -08:00