Commit graph

26599 commits

Author SHA1 Message Date
Martin Probst
cc7ddaed28 Add tests for noLib with <reference lib>. 2019-01-11 09:02:49 +01:00
Martin Probst
11b150129a Do not process library reference directives with noLib set.
When a user sets `noLib`, this indicates that they will supply their own
list of `lib*.d.ts` files as part of input sources. In this situation,
TypeScript should not try to resolve library reference directives.

This avoids a problem where TypeScript loads a file that e.g. contains
`/// <reference lib="es2015.symbol"/>`. Previously, TypeScript would use
its builtin ts.libMap and attempt to load builtin libraries from the
TypeScript installation, instead of respecting the user-supplied set of
libraries.
2019-01-11 09:02:49 +01:00
王文璐
9d16225bc2 emit jsx type arguments 2019-01-11 13:34:18 +08:00
Gabriela Britto
ed5775865a Add missing baseline references 2019-01-10 15:45:00 -08:00
Sheetal Nandi
abc861862a Fix typo 2019-01-10 15:18:02 -08: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
Gabriela Britto
a9ed42f541 Merge branch 'master' into qualified-name-param-tag-error 2019-01-10 09:49:26 -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
0c1c97e501 Accept new baselines 2019-01-09 16:16:31 -08:00
Anders Hejlsberg
9fda7014ca Add regression tests 2019-01-09 16:16:24 -08:00
Anders Hejlsberg
70148a4b55 Improve logic that determines when to resolve conditional types 2019-01-09 16:10:28 -08:00
Gabriela Britto
dd0a612cc9 Use specific error message for qualified param name without leading top level param name 2019-01-09 16:08:14 -08:00
Gabriela Britto
e16be71c08 Add diagnostic message for JSDoc qualified param name without top level param 2019-01-09 15:52:05 -08:00
TypeScript Bot
7174e6a39d Update user baselines (#29336) 2019-01-09 15:50:50 -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
Sheetal Nandi
1b37830615 Merge branch 'master' into incrementalBuild 2019-01-09 10:40:01 -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
Sheetal Nandi
85e6c2f8ab
Merge pull request #26280 from Microsoft/tsconfig_canonicalpath
getScriptInfoOrConfig: Canonicalize tsconfig path before lookup
2019-01-08 16:33:34 -08:00
Sheetal Nandi
4c70bf0292
Merge pull request #29313 from Microsoft/getEditsForRename
There is no need to check for file presence when trying to rename imports based on file rename
2019-01-08 16:24:51 -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
76c9d9f717 Fix the failing test case 2019-01-08 16:08:43 -08:00
Sheetal Nandi
1870ee4099 Merge branch 'master' into tsconfig_canonicalpath 2019-01-08 16:04:22 -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
Nathan Shively-Sanders
ad85e4fd22
Fix gulp baseline-accept (#29301)
* Fix gulp baseline-accept

I think it was ported incorrectly from jake and then never used.

* Re-add read:false to baselineDelete
2019-01-08 11:20:54 -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
Alexander T
945eed8d9b PR feedback: change error #2497 message 2019-01-08 10:54:08 +02:00
Klaus Meinhardt
4cd859aa85 Allow referencing 'this' in parameters of functions in the constructor
Fixes: #29286
2019-01-07 22:09:27 +01:00
csigs
4a0bc59f77
LEGO: Merge pull request 29285
LEGO: Merge pull request 29285
2019-01-07 08:10:45 -08:00
csigs
ec5224f114 LEGO: check in for master to temporary branch. 2019-01-07 16:10:20 +00:00
Sheetal Nandi
5135b83bf9
Merge pull request #29266 from Microsoft/jsxNamespace
Use the sourceFile to determine the jsxNamespace at the location for organizingImports
2019-01-04 14:43:48 -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
Wesley Wigham
dcf825e3cd
Add types entry to tslint build to prevent inclusion of unwanted types installed via user tests 2019-01-04 12:59:11 -08: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
b7d7d5f7b3
Merge pull request #29252 from Microsoft/tscWatchIsolatedModules
Do not cache semantic diagnostics with --isolated modules
2019-01-03 14:35:19 -08:00
Sheetal Nandi
a633f95da7 Do not cache semantic diagnostics with --isolated modules
Fixes #28332
2019-01-03 14:07:25 -08:00
Sheetal Nandi
bce9e2c11c
Merge pull request #29250 from Microsoft/hasContextSensitiveReturnExpression
Fix function declaration without body to be checked as context sensitive
2019-01-03 14:06:13 -08:00
Klaus Meinhardt
2a2b573fa2 Merge branch 'master' of github.com:Microsoft/TypeScript into shebang-comments 2019-01-03 22:44:57 +01:00
Sheetal Nandi
f4a6fb79da Replace ternary expression 2019-01-03 13:29:43 -08:00
Sheetal Nandi
8dff98dda0
Merge pull request #28992 from Microsoft/tscWatchExportUpdate
When removing the errors for the exports from the file, apart from re…moving transitive exports, remove the diagnostics of file that import these exports
2019-01-03 13:26:50 -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
Sheetal Nandi
c426fc6868 Merge branch 'master' into tscWatchExportUpdate 2019-01-03 11:35:54 -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