Commit graph

1272 commits

Author SHA1 Message Date
Anders Hejlsberg
311bb3b2da Add circularity tests 2016-12-08 06:53:29 -08:00
Ron Buckton
91f0194e6a Merge pull request #12743 from Microsoft/fix12737
Fix await for inherited promise
2016-12-07 17:38:47 -08:00
Ron Buckton
8dcbea9675 Fix await for inherited promise 2016-12-07 17:17:17 -08:00
Ron Buckton
7eca4bc9be Fix decorator emit for accessors 2016-12-07 15:48:23 -08:00
Nathan Shively-Sanders
f15a7a3bac Test:instanceof allows callable/constructable RHS 2016-12-07 13:16:23 -08:00
Anders Hejlsberg
d7908d19be Add tests 2016-12-06 14:42:08 -08:00
Nathan Shively-Sanders
4efa61cf80 More tests for binding elements referencing previous elements 2016-12-06 13:05:52 -08:00
Ron Buckton
f89156bf55 Add error for super property before super 2016-12-06 10:47:02 -08:00
Nathan Shively-Sanders
7a9c11c72b Test:destructuring array initialisers refer to previous elements 2016-12-05 16:27:59 -08:00
Nathan Shively-Sanders
fe3ed12a20 Update tests and baselines 2016-12-05 09:58:33 -08:00
Nathan Shively-Sanders
a90d63a414 Add tests for property access w/string index sigs 2016-12-05 09:58:09 -08:00
Anders Hejlsberg
95aed3f4ee Add regression test 2016-12-04 07:49:55 -08:00
Anders Hejlsberg
b7e8a6d1f1 Merge pull request #12643 from Microsoft/keyofUnionIntersection
Properly handle unions and intersections with keyof T and T[K]
2016-12-04 07:03:15 -08:00
Anders Hejlsberg
b4836e3d3d Add tests 2016-12-03 17:19:10 -08:00
Anders Hejlsberg
773c9a734f Add tests 2016-12-03 11:03:40 -08:00
Anders Hejlsberg
1e2425ebfc Add tests 2016-12-02 14:50:14 -08:00
Nathan Shively-Sanders
fc1f6e3ee6 Merge pull request #12564 from Microsoft/rest-of-untyped-binding-pattern-is-any
Rest of untyped binding pattern is { [s: string]: any }
2016-11-30 17:39:18 -08:00
Nathan Shively-Sanders
77226318ef Update baselines 2016-11-30 17:26:30 -08:00
Nathan Shively-Sanders
8e648f9f6d Add property access and --noImplicitAny tests
And update baselines
2016-11-30 13:14:52 -08:00
Ron Buckton
8af87dce8b Merge branch 'master' into asyncGenerators 2016-11-30 12:47:50 -08:00
Anders Hejlsberg
2517187c4a Add tests 2016-11-30 10:24:19 -08:00
Mohamed Hegazy
4c9bdb932a Merge pull request #12552 from Microsoft/spreadRestIntersectionAndUnions
Spread & rest over intersection and unions
2016-11-29 17:27:04 -08:00
Anders Hejlsberg
aaf0c89ed3 Merge pull request #12563 from Microsoft/mappedTypeModifiers
Preserve modifiers in homomorphic mapped types
2016-11-29 16:06:20 -08:00
Anders Hejlsberg
65e98c84d5 Add more tests 2016-11-29 14:06:10 -08:00
Arthur Ozga
4b0697ff9d fix test 2016-11-29 16:04:56 -06:00
Arthur Ozga
3cd1731628 abstract accessors can't have implementations 2016-11-29 15:59:28 -06:00
Nathan Shively-Sanders
f85ca9c395 Test that rest of untyped binding pattern is any 2016-11-29 13:50:56 -08:00
Mohamed Hegazy
51f5ef6752 Update test 2016-11-29 13:37:21 -08:00
Anders Hejlsberg
f366ae0332 Add tests 2016-11-29 12:48:55 -08:00
Anders Hejlsberg
5dd4c9ef54 Merge pull request #12528 from Microsoft/mappedTypeInference
Type inference for isomorphic mapped types
2016-11-28 13:30:45 -08:00
Ethan Resnick
8b7252c4b0 Update keyof tests to reflect #12425
Removes number from all the keyof types, and adds a test that numeric
indexes are ignored.
2016-11-28 04:21:33 -08:00
Anders Hejlsberg
997184708d Add tests 2016-11-27 12:49:27 -08:00
Anders Hejlsberg
12b63d230a Add regression test 2016-11-26 10:06:33 -08:00
Yuichi Nukiyama
40252248e0 remove extra tests 2016-11-25 07:10:05 +09:00
Yuichi Nukiyama
4c9ab41e3d Merge branch 'master' into defult_export_error_message 2016-11-23 11:40:10 +09:00
Anders Hejlsberg
43e383f20b Add more tests 2016-11-22 14:28:45 -08:00
Anders Hejlsberg
66f8a406dd Update tests 2016-11-22 14:28:21 -08:00
Anders Hejlsberg
b662a8b319 Add test case 2016-11-21 13:10:42 -08:00
Anders Hejlsberg
5498a95245 Update tests 2016-11-21 11:42:38 -08:00
Anders Hejlsberg
998246af9c Merge pull request #12389 from Microsoft/keyofRelations
Minor fixes for 'keyof T' and indexed acces types
2016-11-20 15:54:41 -08:00
Anders Hejlsberg
a439e62138 Add tests 2016-11-19 15:10:22 -08:00
Yuichi Nukiyama
94c78961ef modify error message 2016-11-19 16:18:20 +09:00
Ron Buckton
1980334328 Merge branch 'master' into asyncGenerators 2016-11-18 17:55:56 -08:00
Ron Buckton
38b7757e57 Tests for iterationMode=iterable 2016-11-18 17:55:06 -08:00
Yuichi Nukiyama
725dbc2add Merge branch 'master' into defult_export_error_message 2016-11-19 10:51:42 +09:00
Ron Buckton
c72509b190 Added iterationMode switch, consolidate some tests, cleanup 2016-11-18 16:50:43 -08:00
Nathan Shively-Sanders
71b28a024a Merge pull request #12310 from Microsoft/check-object-rest-destructuring-assignment
Check object rest destructuring assignment
2016-11-18 16:01:25 -08:00
Anders Hejlsberg
a789990781 Add tests 2016-11-18 13:31:10 -08:00
Ron Buckton
1c0917abef Merge branch 'master' into asyncGenerators 2016-11-18 10:32:54 -08:00
Anders Hejlsberg
075a3eb98f Add new tests 2016-11-18 06:27:45 -08:00
Ron Buckton
281c8902a6 ES5 tests for async generators 2016-11-18 00:22:26 -08:00
Ron Buckton
c758359a63 ES6 tests for async generators 2016-11-18 00:11:53 -08:00
Ron Buckton
42085a6576 Conformance tests for for-await-of 2016-11-17 23:25:24 -08:00
Ron Buckton
e53263edbb Added conformance tests for async generators 2016-11-17 23:17:42 -08:00
Nathan Shively-Sanders
c7b0083820 Test widen literal types of parameter properties 2016-11-16 15:15:30 -08:00
Nathan Shively-Sanders
641948fb0c Test assignability checking of object rests 2016-11-16 13:41:18 -08:00
Anders Hejlsberg
a5d9e9624d Merge pull request #12301 from Microsoft/recursiveMappedTypes
Fix recursive mapped types
2016-11-16 10:23:14 -08:00
Anders Hejlsberg
c00a04d781 Add tests 2016-11-16 06:49:04 -08:00
Ron Buckton
3a67174314 Merge branch 'master' into streamlineDestructuring 2016-11-15 18:10:02 -08:00
Ron Buckton
ba4f52c055 Merge remote-tracking branch 'origin/object-rest-emit-for-method-and-accessor-parameters' into streamlineDestructuring 2016-11-15 17:09:49 -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
Nathan Shively-Sanders
498d978c21 Test object rest parameter emit: methods/accessors 2016-11-15 09:55:56 -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
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
Anders Hejlsberg
f437c8f318 Merge pull request #12114 from Microsoft/mappedTypes
Mapped types
2016-11-13 15:39:32 -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
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
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
25462c9571 Merge pull request #12028 from Microsoft/object-rest
Object rest
2016-11-10 09:18:13 -08:00
Nathan Shively-Sanders
9b1f43bdda Add strictNullChecks test for object spread 2016-11-09 13:40:21 -08:00
about-code
b623f3771e Fix #442: (es3, es5, es6+) Show compiler errors for conflicting properties. 2016-11-09 21:08:56 +01: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
Nathan Shively-Sanders
9977936190 Do not emit __rest for --target esnext 2016-11-07 11:34:37 -08:00
Nathan Shively-Sanders
609cd0016b Merge branch 'object-spread' into object-rest 2016-11-07 11:10:29 -08:00
Nathan Shively-Sanders
f03fecbd31 Merge branch 'master' into object-spread 2016-11-07 11:02:49 -08:00
Nathan Shively-Sanders
d4a5b0855c Add --target esnext tests and update baselines 2016-11-07 09:56:48 -08:00
about-code
d9a46e1ae6 Allowing static arguments() and static caller() for target "es6".
Disallow non-function properties `static arguments` and `static caller`, though.
2016-11-06 17:59:38 +01:00
about-code
189dbddb10 Accept baseline tests. Fixing diagnosticMessages.json (merge result not included in prior commit). 2016-11-05 18:42:53 +01:00
about-code
8fa07d695e Merge remote-tracking branch 'upstream/master' 2016-11-05 17:15:51 +01:00
Nathan Shively-Sanders
a55ed26d2b Spread any types to any 2016-11-04 16:06:33 -07:00
Ron Buckton
cbec19afd7 Ensure transformFlags are correct before visiting a node. 2016-11-03 17:21:36 -07:00
Nathan Shively-Sanders
14f8b9990f Update objectRestAssignment test
Missed previously, just got the baselines
2016-11-03 13:33:16 -07:00
Nathan Shively-Sanders
7ff8876096 Merge branch 'object-spread' into object-rest-syntax 2016-11-03 10:12:45 -07:00
Anders Hejlsberg
4019265fe1 Update tests 2016-11-03 10:01:42 -07:00
Nathan Shively-Sanders
a077fd104a Remove spread type tests from spread tests 2016-11-03 09:39:58 -07:00
Nathan Shively-Sanders
ac20b46f4f Add rest tests 2016-11-02 14:56:58 -07:00
Nathan Shively-Sanders
f65dd2101c Test index [access] types inside spread types 2016-11-02 11:37:52 -07:00
Nathan Shively-Sanders
2ae6ecc1a5 Merge branch 'master' into object-spread 2016-11-02 10:57:20 -07:00
Anders Hejlsberg
4bbe29ab73 Adding tests 2016-11-02 09:13:45 -07:00
Andy
ecb7b00e1c Forbid augmentation of untyped module (#11962)
* Forbid augmentation of untyped module

* Just use `undefined` for untyped modules
2016-10-31 15:04:22 -07:00
Nathan Shively-Sanders
58ffb4e668 Merge branch 'master' into object-spread 2016-10-27 15:29:21 -07:00
Andy Hanson
4937d9c8b4 Allow untyped imports 2016-10-27 08:54:19 -07:00
Andy Hanson
9130fbd731 Merge branch 'master' into refactor_module_resolution 2016-10-26 08:27:34 -07:00
Nathan Shively-Sanders
32af04660f Merge branch 'master' into object-spread 2016-10-24 15:46:09 -07:00
Andy
e20f52b758 Merge pull request #11757 from Microsoft/destructure_catch
Allow destructuring in catch clauses
2016-10-24 14:55:23 -07:00
Nathan Shively-Sanders
8f59993186 Merge branch 'master' into object-spread 2016-10-24 10:04:08 -07:00
Nathan Shively-Sanders
ff92afd47b Update baselines with new index signature rules 2016-10-21 16:27:32 -07:00
Nathan Shively-Sanders
422f73b1a9 Update and improve spread intersection tests 2016-10-21 10:54:53 -07:00
Arthur Ozga
81383e172f add test 2016-10-20 15:56:44 -07:00
Andy Hanson
fab0859869 Allow destructuring in catch clauses 2016-10-20 13:35:46 -07:00
Nathan Shively-Sanders
d9afa34be1 Update spread w/intersection tests 2016-10-20 09:07:01 -07:00
Nathan Shively-Sanders
ad10ec56c1 Update tests w/spread assignability+apparent type 2016-10-19 15:05:42 -07:00
Nathan Shively-Sanders
62c186872d Update inference test for spread types 2016-10-19 13:14:20 -07:00
Nathan Shively-Sanders
f9fe01a6e3 Merge branch 'master' into object-spread 2016-10-19 09:03:51 -07:00
Andy Hanson
b557211a37 Return both ts and js results from module resolution, and don't have moduleNameResolver responsible for omitting files based on compiler options 2016-10-18 07:09:43 -07:00
Herrington Darkholme
df58df17f6 Add partially annotated function tests 2016-10-17 09:04:16 -07:00
about-code
9122f62431 Merge remote-tracking branch 'upstream/master' 2016-10-17 00:02:44 +02:00
about-code
8a37a162b2 Fix for issue #442 2016-10-16 18:43:55 +02:00
about-code
fc5b2e524d Fix for issue #442 2016-10-16 18:34:57 +02:00
Andrej Baran
17d60d5d8f Merged master into es2017-target 2016-10-15 08:31:22 +02:00
Andrej Baran
7352e97121 Cleanup ES2017 async tests 2016-10-15 01:16:11 +02:00
Nathan Shively-Sanders
b6819dc939 Merge branch 'master' into object-spread 2016-10-14 09:32:57 -07:00
Nathan Shively-Sanders
7eb39cc80c Allow any type for spreads in JsxExpression 2016-10-13 10:17:01 -07:00
Nathan Shively-Sanders
d29c78e718 Add spread syntax tests for JsxExpressions
And baselines
2016-10-13 09:28:39 -07:00
Anders Hejlsberg
8bcb22c56d Add tests 2016-10-13 06:40:16 -07:00
Andrej Baran
a500fd9211 Merge branch 'master' into es2017-target 2016-10-13 14:02:54 +02:00
Andrej Baran
1b4c0e331e Add es2017 async conformance 2016-10-12 21:58:25 +02:00
Nathan Shively-Sanders
1728ae1cbc Update baselines with spread string's numeric indexers 2016-10-12 09:01:14 -07:00
Nathan Shively-Sanders
4bc4a008bb Test spread type inference+more index signature tests 2016-10-11 16:14:47 -07:00
Nathan Shively-Sanders
0dd1f0c00f Add tests and update baselines.
1. Union/intersection tests.
2. Primitive tests.
3. Update baselines after removing errors.
2016-10-10 10:07:41 -07:00
Nathan Shively-Sanders
98720755bd Spread type:new assignability+simplification tests 2016-10-07 08:58:50 -07:00
Nathan Shively-Sanders
cec3a3703a Merge branch 'master' into object-spread 2016-10-07 08:34:06 -07:00
Yui
a67ad06933 Merge pull request #10239 from Microsoft/fix10193
Fix 10193: Compiler crash with decorator and two "export default"s
2016-10-06 14:59:43 -07:00
Anders Hejlsberg
44c475f6bb Merge pull request #11263 from Microsoft/controlFlowLetVar
Control flow analysis for implicit any variables
2016-10-06 14:23:38 -07:00
Andy Hanson
4907fd1d44 Have classic module resolution use @types as a fallback 2016-10-06 06:01:18 -07:00
Yui
f8b34c96a0 Merge pull request #11118 from Microsoft/fix11081
Fix11081
2016-10-05 10:28:22 -07:00
Nathan Shively-Sanders
57850ecf1a Add more generic assignability cases 2016-10-03 15:49:23 -07:00
Nathan Shively-Sanders
b9af986df1 Update object spread scenarios test 2016-10-03 15:18:04 -07:00
Kanchalai Tanglertsampan
f195bd59df Merge branch 'master' into fix10193 2016-09-30 10:43:45 -07:00
Anders Hejlsberg
bd19f1db09 Merge branch 'master' into controlFlowLetVar 2016-09-28 18:44:20 -07:00
Nathan Shively-Sanders
484e66fa09 Merge branch 'master' into object-spread 2016-09-28 10:33:47 -07:00
Nathan Shively-Sanders
0f773c5673 Add object spread scenario tests 2016-09-27 16:17:14 -07:00
Nathan Shively-Sanders
78420adfcd Test object spread index signatures 2016-09-27 11:05:58 -07:00
Nathan Shively-Sanders
d6e414ce5b Test spread type index signatures 2016-09-27 10:33:50 -07:00
Nathan Shively-Sanders
39385590b6 Move interfaceSpread to correct location 2016-09-26 09:43:59 -07:00
Nathan Shively-Sanders
0fea59f642 Add spread tests 2016-09-26 09:33:08 -07:00
Anders Hejlsberg
9771f429ed Add tests 2016-09-24 15:58:53 -07:00
Yuichi Nukiyama
e65cdc3953 change error message 2016-09-24 10:18:49 +09:00
Kanchalai Tanglertsampan
04640d0e97 Add tests 2016-09-23 17:28:08 -07:00
Anders Hejlsberg
b14b24a96e Update tests 2016-09-21 16:03:51 -07:00
Kanchalai Tanglertsampan
58976ffd38 Merge branch 'master' into emitTypeAliasInDeclarationFile 2016-09-16 14:29:54 -07:00