Commit Graph

11683 Commits

Author SHA1 Message Date
Ryan Cavanaugh 449d60cdff Don't crash on no args 2018-06-05 14:14:16 -07:00
Ryan Cavanaugh 45842a0c34 Merge remote-tracking branch 'weswigham/sourcemap-concatenation-station' into tsbuild 2018-06-05 12:31:32 -07:00
Ryan Cavanaugh 9b0dc37f42 Merge branch 'fixMissingScriptInfo' into tsbuild 2018-06-04 10:59:42 -07:00
Ryan Cavanaugh 7e9e29ce64 Store + use the resolved path of sourceFiles in proj. ref. scenarios 2018-06-01 13:20:57 -07:00
Ryan Cavanaugh 7a1de6142b Scaffold watch mode 2018-06-01 09:44:35 -07:00
Ryan Cavanaugh d21c03ab9d Invalidation + separated downstream builds 2018-05-31 14:38:26 -07:00
Wesley Wigham eb1973a4fd Fixup sourcemap positions and text writer calculations 2018-05-30 19:29:47 -07:00
Wesley Wigham 8adbf85e0e Candidate sectional sourcemap emit implementation 2018-05-30 17:53:26 -07:00
Wesley Wigham 04379d548c Lookup type arguments correcly for taged templates when checking generic arity (#24496) 2018-05-30 15:03:04 -07:00
Nathan Shively-Sanders cdfa63aa40 Fix exported type resolution in commonjs (#24495)
* Fix resolution of exported types in commonjs

It is fine to resolve the types of exported classes in ES6:

```js
export class C {
}
var c = new C()
```

But not for commonjs exported classes:

```js
module.exports.C = class {
}
var c = new C() // should error
```

Fixes #24492

* All jsdoc type aliases are available locally in commonjs modules

* Check that location isSourceFile before commonJsModuleIndicator
2018-05-30 14:12:38 -07:00
Andy 43bf039a94 Add refactor to convert namespace to named imports and back (#24469)
* Add refactor to convert namespace to named imports and back

* Add tests and comments

* Code review

* Handle shorthand property assignment and re-export

* Don't use forEachFreeIdentifier

* Fix rename after "."
2018-05-30 14:11:53 -07:00
Andy 239dde8ff1 Fix cast: location may be a SourceFile (#24498) 2018-05-30 13:37:32 -07:00
Sheetal Nandi 2226cd6a99 Merge pull request #24471 from Microsoft/watchInSiblingOfRoot
Instead of creating filter for subDirectories to watch in the ancestor directory of root, watch those subDirectories for failed lookup locations
2018-05-30 11:12:23 -07:00
Anders Hejlsberg a8a31ed508 Merge pull request #24439 from Microsoft/unknownType
New 'unknown' top type
2018-05-30 10:22:02 -07:00
Andy 675e21203e Improve template literal tests (#24359)
* Improve template literal tests

* Inline isTemplateLiteralToken where possible
2018-05-30 10:21:00 -07:00
Ryan Cavanaugh cd7a844a48 We definitely have a type system 2018-05-30 10:12:51 -07:00
Ryan Cavanaugh f8c4301f14 Add more errors; commandline help for --build; invalid flag combo detection 2018-05-30 10:00:35 -07:00
Nathan Shively-Sanders 22cdff59e4 Better fix for bogus duplicate identifier in module exports (#24491) 2018-05-30 09:59:14 -07:00
Ron Buckton fc3e88e26f Merge pull request #24481 from Microsoft/fix24173
Fix async generator return as well
2018-05-30 09:43:00 -07:00
Andy 5e2c7ffce6 isValidMethodAccess: use getTypeOfPropertyOfType instead of getTypeOfFuncClassEnumModule (#24488) 2018-05-30 09:12:24 -07:00
Anders Hejlsberg 86643902b2 Rename unknownType to errorType in merged code 2018-05-30 08:17:09 -07:00
Anders Hejlsberg e22a9d6fc1 Merge branch 'master' into unknownType 2018-05-30 07:45:10 -07:00
Anders Hejlsberg 6b1c84e84a Remove eager resolution of distributive conditional types 2018-05-29 17:55:31 -07:00
Ron Buckton 6f7715444f Fix async generator return as well 2018-05-29 17:54:59 -07:00
Ron Buckton c224a824f3 Do not await iterated value in for-await-of 2018-05-29 15:33:43 -07:00
Sheetal Nandi 939e3e4780 Instead of creating filter for subDirectories to watch in the ancestor directory of root, watch those subDirectories for failed lookup locations
Before this change, when failed lookup location didnt fall in root directory,
we tried to find the ancestor directory of the rootDirectory to watch.
We also created subDirectory map for the directories that are being watched so we dont go through invalidation if path is unwanted directory
With this change, we will watch those subdirectories instead of root. On windows node supports file system level recursive watching so the earlier approach was better because we reduced number of watches created
But on other os, since node doesnt support it, we create the watches for existing folders outselves, so earlier approach becomes expensive.
This should be better compromize to satisfy both types of OS.
Fixes #24434
2018-05-29 14:49:19 -07:00
Nathan Shively-Sanders 36c580378f Fix duplicate identifier error with module.exports (#24466)
A bug in checkSpecialAssignment added bogus duplicate identifier errors
when using module.exports assignment to export a class. This commit
fixes that.
2018-05-29 14:29:48 -07:00
Nathan Shively-Sanders 15bfaf1cf6 Skip IntrinsicAttributes elaboration in JSX errors (#24461)
* Skip IntrinsicAttributes elaboration in JSX errors

Do not issue an error message for a source type that comes from JSX
attributes and a target type that is an intersection containing
IntrinsicAttributes or IntrinsicClassAttributes. This will make error
messages simpler and less confusing.

Note:
1. There will always be elaboration under the skipped message, so this
won't elide errors completely.
2. Rarely (once in the tests) the intersection type will have more that
one non-Intrinsic* member. However, these additional members don't
provide useful information either, so it's fine to skip them.

* Add test of IntrinsicAttributes error

* Fix indentation in test
2018-05-29 14:00:26 -07:00
Ryan Cavanaugh fe191fec6d Merge branch 'master' into tsbuild 2018-05-29 13:14:12 -07:00
Ron Buckton 6657df47f0 Fix return and throw propagation for yield* 2018-05-29 12:56:46 -07:00
Anders Hejlsberg 074961f303 keyof unknown should be never 2018-05-29 12:54:00 -07:00
Ryan Cavanaugh 70fa29b627 Add graph ordering tests 2018-05-29 10:00:54 -07:00
Anders Hejlsberg a83653ed99 Add new diagnostic 2018-05-27 15:43:44 -07:00
Anders Hejlsberg 353802c140 Check we have non-unknown where we require non-nullable 2018-05-27 15:43:31 -07:00
Anders Hejlsberg 79e7700c6b { [P in unknown]: XXX } should resolve to { [x: string]: XXX } 2018-05-27 10:25:13 -07:00
Anders Hejlsberg 9e4d19f2ef Fixes to keyof and narrowing by typeof check 2018-05-26 18:18:08 -07:00
Anders Hejlsberg b20925ad40 'null' and 'undefined' are bottom types in non-strictNullChecks mode 2018-05-26 12:09:18 -07:00
Anders Hejlsberg 2003b2a3e2 Implement 'unknown' type in checker 2018-05-26 09:53:07 -07:00
Anders Hejlsberg 03f464f433 Add 'unknown' keyword to scanner/parser/emitter 2018-05-26 08:51:09 -07:00
Anders Hejlsberg 8f193b40ee Free up one bit in TypeFlags 2018-05-26 08:29:30 -07:00
Anders Hejlsberg 07a696f785 Rename existing unknownType to errorType 2018-05-26 08:07:25 -07:00
Ryan Cavanaugh a7fcbcd3a4 Use better toposorting algorithm 2018-05-25 16:06:33 -07:00
Mohamed Hegazy a7a68d9591 Merge branch 'fix-es5-export-class-name-object' of https://github.com/Kingwl/TypeScript into Kingwl-fix-es5-export-class-name-object 2018-05-25 15:45:31 -07:00
王文璐 7f127de89e remove invalid check 2018-05-25 09:36:16 +08:00
Ryan Cavanaugh 1863d3fd48 Graph ordering test WIP 2018-05-24 17:48:45 -07:00
Ryan Cavanaugh 8ac795ba01 Correctly skip upstream-blocked projects 2018-05-24 16:21:32 -07:00
Wesley Wigham 8f9c0861bc Use external aliases in quickinfo and signature help return types (#24391)
* Dont include import types in quick info type names

* Add UseAliasDefinedOutsideCurrentScope flag to LS operations which were missing it
2018-05-24 15:19:57 -07:00
Nathan Shively-Sanders e250942d6a Disallow nested object param syntax in callback tag (#24392)
* Callback tag:Disallow nested-object-param syntax

Previously this caused a crash in parsing. If/when we want to support
this syntax, we will need to fix this crash.

* Update baselines
2018-05-24 15:11:33 -07:00
Elizabeth Dinella 13734e7d68 Fix for issue #6154 - overriding methods with properties in the derived class (#24343)
* Fix to issue 6154 - Overriding a method with a property in the derived class should not cause a compiler error

* new baselines

* fixed deleted baselines
2018-05-24 14:12:13 -07:00
Ryan Cavanaugh 19ab8abbb9 Fix strictNullChecks breaks 2018-05-24 13:42:12 -07:00