4948 Commits

Author SHA1 Message Date
Anders Hejlsberg
73ada7a78d Merge pull request #12251 from Microsoft/fixTypePredicateStructuralMatch
Fix type predicates with structurally identical types
2016-11-15 13:20:35 -08:00
Anders Hejlsberg
0ba23483e8 Merge pull request #12276 from Microsoft/libMappedTypes
Predefined mapped types in lib.d.ts
2016-11-15 13:19:58 -08:00
Anders Hejlsberg
04a0f55e96 Revise tests 2016-11-15 12:15:11 -08:00
Nathan Shively-Sanders
2496756aed Merge branch 'master' into object-spread-rest-fixes 2016-11-15 11:19:01 -08:00
Paul van Brenk
1924298d87 Merge branch 'master' into unusedidentifier 2016-11-15 10:17:37 -08:00
Nathan Shively-Sanders
a74e9d8ccf Merge pull request #12158 from Microsoft/fix-literal-comparability-in-relational-comparison-operators
Fix literal comparability in relational comparison operators
2016-11-15 08:24:06 -08:00
Anders Hejlsberg
6d28595e5a Add repro test 2016-11-14 17:06:46 -08:00
Nathan Shively-Sanders
fe66d9ef9f Add spread tests and update rest tests 2016-11-14 16:23:40 -08:00
Nathan Shively-Sanders
e50adc0904 Merge pull request #12223 from Microsoft/fix-object-spread-rest-async-emit
Fix object spread+async emit
2016-11-14 16:15:15 -08:00
Mohamed Hegazy
1164df2c6d Merge pull request #12197 from Microsoft/commentsSuperCallReturns
Fix up comments for super calls rewritten as returns
2016-11-14 16:10:03 -08:00
Ron Buckton
06a13b9d10 Fix string constituent check in checkElementTypeOfArrayOrString 2016-11-14 15:22:04 -08:00
Mohamed Hegazy
2827b370cc Merge pull request #12207 from ethanresnick/precise-object-entry-types
More precise Object.entries type declarations
2016-11-14 13:55:27 -08:00
Mohamed Hegazy
a0338d15e1 Ignore optionality in the comparable relationship (#12202)
* Added tests.

* Accepted baselines.

* Avoid checking for optionality in comparability checks.

* Accepted baselines.
2016-11-14 10:47:48 -08:00
Nathan Shively-Sanders
0adc76bd2b Test object spread+async emit & nested spread emit 2016-11-14 08:54:32 -08:00
Nathan Shively-Sanders
0cda239e1c Merge pull request #12156 from Microsoft/fix-jsdoc-missing-space-from-bad-indent
Fix jsdoc missing space from bad indent
2016-11-14 08:21:40 -08:00
Anders Hejlsberg
f437c8f318 Merge pull request #12114 from Microsoft/mappedTypes
Mapped types
2016-11-13 15:39:32 -08:00
Anders Hejlsberg
85702197b4 Add regression test 2016-11-13 08:35:40 -08:00
Ethan Resnick
ea33d6e501 More precise Object.entries type declarations
We can leverage the new index type queries and indexed access types
from #11929 to get better type inference for Object.entries.
2016-11-13 02:59:50 -05:00
Daniel Rosenwasser
ffed2484d3 Added tests. 2016-11-12 12:46:01 -08:00
Anders Hejlsberg
9ac7667d5c Address CR feedback 2016-11-12 08:55:23 -08:00
Daniel Rosenwasser
486f156a69 Added test. 2016-11-12 01:40:37 -08:00
Andy Hanson
1e92a9803b Merge branch 'master' into path_mapping_exact_extension 2016-11-11 14:11:40 -08:00
Andy Hanson
a0e4ab94f1 Allow JS files 2016-11-11 13:59:13 -08:00
Andy Hanson
240b474ba3 Merge branch 'master' into path_mapping_exact_extension 2016-11-11 13:52:10 -08:00
Andy Hanson
6c7e1b6913 Merge branch 'master' into symlink3 2016-11-11 13:35:47 -08:00
Andy Hanson
b65729e5b2 Merge branch 'master' into common_source_directory 2016-11-11 13:10:29 -08:00
Anders Hejlsberg
ca3f797832 More tests 2016-11-11 11:00:09 -08:00
Nathan Shively-Sanders
de9f59a301 Test non-identifier rest in destructuring assignment 2016-11-11 08:57:11 -08:00
Anders Hejlsberg
e9b6ddc9ae Add tests 2016-11-11 07:40:05 -08:00
Nathan Shively-Sanders
e301cfe58c Raise literal type to its base in a comparison
Similar to ===, except that it always applies, even when comparing two
literals.
2016-11-10 14:29:48 -08:00
Mohamed Hegazy
d537b79c61 Merge release-2.1 into master (#12157)
* Update LKG

* Update version

* Update LKG

* Skip overloads with too-short function parameters

If the parameter of an overload is a function and the argument is also a
function, skip the overload if the parameter has fewer arguments than
the argument does. That overload cannot possibly apply, and should not
participate in, for example, contextual typing.

Example:

```ts
interface I {
  (a: number): void;
  (b: string, c): void;
}
declare function f(i: I): void;
f((x, y) => {});
```

This code now skips the first overload instead of considering.

This was a longstanding bug but was only uncovered now that more
functions expressions are context sensitive.

* Test skip overloads w/too-short function params

1. Update changed baseline.
2. Add a new test with baseline.

* Minor style improvements

* Ignore optionality when skipping overloads

* Do not use contextual signatures with too few parameters

* isAritySmaller runs later: getNonGenericSignature

* rewrite void-returning statements in constructors that capture result of super call (#11868)

* rewrite void-returning statements in constructors that capture result of super call

* linter

* Update LKG

* Fix emit inferred type which is a generic type-alias both fully and partially fill type parameters

* Add tests and baselines

* Skip trying to use alias if there is target type

* Update baselines

* Add diagnostics to remind adding tsconfig file for certain external project (#11932)

* Add diagnostics for certain external project

* Show tsconfig suggestion

* fix lint error

* Address pr

* fix comment

* Update error message

* Flag for not overwrite js files by default without generating errors (#11980)

* WIP

* Properly naming things

* refactor

* apply the option to all files and check out options

* Fix typo

* Update LKG

* lockLinter

* use local registry to check if typings package exist (#12014) (#12032)

use local registry to check if typings package exist

* Add test for https://github.com/Microsoft/TypeScript/pull/11980 (#12027)

* add test for the fix for overwrite emitting error

* cr feedback

* enable sending telemetry events to tsserver client (#12034) (#12051)

enable sending telemetry events

* Update LKG

* Reuse subtree transform flags for incrementally parsed nodes (#12088)

* Update LKG

* Update version

* Update LKG

* Do not emit "use strict" when targeting es6 or higher or module kind is es2015 and the file is external module

* Add tests and baselines

* [Release 2.1] fix11754 global augmentation (#12133)

* Exclude global augmentation from module resolution logic

* Address PR: check using string literal instead of NodeFlags.globalAugmentation

* Remove comment
2016-11-10 14:28:34 -08:00
Nathan Shively-Sanders
6e1aac1c42 Merge pull request #12147 from mylesmegyesi/12050-IncompatableAssignementOfIdenticallyNamedTypes
Adds error message for incompatible assignment of identically named type
2016-11-10 13:17:31 -08:00
Nathan Shively-Sanders
973d83ce93 Merge branch 'master' into fix-jsdoc-missing-space-from-bad-indent 2016-11-10 13:12:32 -08:00
Nathan Shively-Sanders
8bd0a47c82 Retain space after first word in multiline jsdoc
For words that were shorter than the jsdoc indent level, the space was
omitted previously.
2016-11-10 13:11:32 -08:00
Nathan Shively-Sanders
ba6e5a0ffa Test error for import helpers with no __rest 2016-11-10 11:47:03 -08:00
Sheetal Nandi
c87bce1119 Merge pull request #11978 from Microsoft/errorReportingInJsFile
Report all the js file errors and skip only the nodes that are not allowed in JS file
2016-11-10 10:37:16 -08:00
Andy Hanson
0422a756d9 Add test with a referenced dts file 2016-11-10 10:25:33 -08:00
Sheetal Nandi
c458576553 Merge pull request #12135 from Microsoft/jsxFactory
Support for --jsxFactory option
2016-11-10 09:49:57 -08:00
Myles Megyesi
c05e226c4b
Adds error message for incompatible assignment of identically named type
Fixes issue #12050
2016-11-10 11:32:03 -06:00
Nathan Shively-Sanders
be5e5fb872 Merge pull request #11150 from Microsoft/object-spread
Object spread/rest
2016-11-10 09:28:58 -08:00
Nathan Shively-Sanders
6398e0d6dd Merge pull request #11633 from Microsoft/fix-comparable-in-switch
Fix comparable in switch
2016-11-10 09:20:46 -08:00
Nathan Shively-Sanders
25462c9571 Merge pull request #12028 from Microsoft/object-rest
Object rest
2016-11-10 09:18:13 -08:00
Sheetal Nandi
a88c2ae1e4 Add test cases for when jsxFactory cannot be resolved 2016-11-09 16:56:43 -08:00
Sheetal Nandi
c6b1bbe12d Enabled test case for source map 2016-11-09 16:51:10 -08:00
Sheetal Nandi
f7bac98948 Verify that jsxFactory is either identifier or qualified name 2016-11-09 14:32:42 -08:00
Nathan Shively-Sanders
9b1f43bdda Add strictNullChecks test for object spread 2016-11-09 13:40:21 -08:00
Sheetal Nandi
4b8a55793a Add support for taking in jsxFactory option and report errors for invalid combinations 2016-11-09 12:23:59 -08:00
Sheetal Nandi
78bb276216 Merge branch 'master' into errorReportingInJsFile 2016-11-09 11:38:11 -08:00
Nathan Shively-Sanders
01969475cf Improve nested destructuring test for ESNext emit
Now with object destructuring inside array destructuring inside object
destructuring! Each with their own array/object rest!

Also updates baselines.
2016-11-09 10:51:56 -08:00
Sheetal Nandi
6456325973 Handle abstract and const modifiers 2016-11-09 10:39:46 -08:00