451 Commits

Author SHA1 Message Date
Mohamed Hegazy
b0d7d5a7ef
Fix #21089: Do not infer from numeric index signature in Object.values and Object.entries (#21129)
* Fix https://github.com/Microsoft/TypeScript/issues/21089: Do not infer from numeric index signature in Object.values and Object.entries

* Update test
2018-01-17 14:16:11 -08:00
falsandtru
da593ca7a8 Fix WeakSet interface (#19756) 2018-01-09 22:06:06 -08:00
Andy
39dfeb0176 Add stricter parameter types for Object.values and Object.entries (#20553)
* Add stricter parameter types for Object.values and Object.entries

* Use mapped type and constrain 'T extends object'

* Revert everything but change to parameter types
2018-01-08 15:33:33 -08:00
benbraou
804eb32208 feat(es2018): add definitions for Array.prototype.flatten and Array.prototype.flatMap (#20431)
* bug(esnext): add definitions for flatten and flatMap

Fixes #20410

* bug(esnext) add overloads for flatten
2018-01-08 14:59:37 -08:00
Mohamed Hegazy
00d4acaad2
Port generated lib files (#21076) 2018-01-08 14:57:31 -08:00
Jing Ma
16a882eb8b Optimized annotation according to Spec (#19906) 2018-01-08 13:44:49 -08:00
Andy
fd5ed5ac79
Have Set and Map constructors take ReadonlyArrays (#20606) 2018-01-08 11:39:52 -08:00
Mohamed Hegazy
c51dfa5596
Port generated lib files (#21071) 2018-01-08 10:35:13 -08:00
benbraou
b36d614b56 bug(esnext): add definition for promise.finally (#20511)
Fixes #20411
2018-01-04 15:31:59 -08:00
Ryan Cavanaugh
100262537a Remove TODO 2017-12-13 10:58:04 -08:00
Daniel Rosenwasser
8d209a3672
Merge pull request #20467 from Kovensky/array-from-union-fix
Accept Iterable|ArrayLike union in Array.from, add tests
2017-12-07 17:22:05 -08:00
Daniel Rosenwasser
53657069bc
Merge pull request #20517 from gagoman/16900
fix docs for Math.ceil and Math.floor (#16900)
2017-12-07 16:56:27 -08:00
Andy
5e5b7706e5
Hack to allow concat to work even when an Array isn't assignable to ReadonlyArray (#20455) 2017-12-07 12:15:12 -08:00
Alex Khomchenko
d383f18d72 fix docs for Math.ceil and Math.floor (#16900) 2017-12-06 22:53:42 +01:00
Diogo Franco (Kovensky)
c894eebe51 Accept Iterable|ArrayLike union in Array.from, test 2017-12-05 14:37:51 +09:00
benbraou
49a48ffd4d fix(es2018): add a target and an initial lib (#20385)
* run Jake LKG before es2018 addition

Fixes #20342

* fix(es2018): add a target and an initial lib

Fixes #20342
2017-12-02 11:16:59 -08:00
Mohamed Hegazy
d62a8beea0
Port generated lib files (#20213) 2017-11-22 15:42:04 -08:00
Mohamed Hegazy
cc7b46bb75
Port generated lib files (#20177)
* Port generated lib files

* Accept baselines
2017-11-20 17:28:38 -08:00
Wilson Hobbs
c2f0c580db add types for escape and unescape methods #18813 (#19015)
* add types for escape and unescape methods #18813
although the issue is marked working as expected, it is important to mention that most major browsers maintain support for escape and unescape, and some javascript codebases moving to typescript may have escape and unescape in them. They are valid JavaScript, and thus they should be included in the global definition.

* add escape and unescape types to lib in tests

* update tests to turn CI green
2017-11-13 10:37:54 -08:00
Adrian Leonhard
1408a4d2b7 Add Symbol.species to ArrayConstructor, MapConstructor, SetConstructor, ArrayBufferConstructor. (#18652)
Fix Symbol.species in RegExpConstructor and PromiseConstructor.

See https://github.com/Microsoft/TypeScript/issues/2881 .
2017-11-08 17:27:02 -08:00
Jing Ma
6a07793332 Fixed minor syntactics error (#19801) 2017-11-07 09:02:26 -08:00
falsandtru
28ed9b307b Update DOM iterable interfaces (#19752)
* Make HTMLCollections Iterable

* Sort definitions
2017-11-06 13:12:47 -08:00
Eugene Timokhov
5b9905d5a4 Added empty constructors to TypedArrays from es2017 (#19680) 2017-11-06 13:00:05 -08:00
Mohamed Hegazy
445001e171
Port generated lib files (#19772) 2017-11-06 10:24:21 -08:00
Eugene Timokhov
c3e19ab131 Split ArrayConstructor.from method into 2 overloads #19682 (#19693) 2017-11-02 16:17:10 -07:00
Mohamed Hegazy
5979c9a206
Port generated lib files (#19690) 2017-11-02 15:11:38 -07:00
Mohamed Hegazy
03ad0c6cde Port generated lib files 2017-10-23 13:02:40 -07:00
Mohamed Hegazy
faa04a2402 Update generated files (#19177) 2017-10-13 16:47:40 -07:00
falsandtru
d23e5f1ee2 Fix Array.{reduce,reduceRight} methods (#18987) 2017-10-09 17:11:31 -07:00
falsandtru
661ecc241e Improve Object.{values,entries} static methods (#18875) 2017-10-09 15:08:22 -07:00
Joe Calzaretta
bb3467b8e1 Handle type guard predicates on Array<T>.find (#18160)
* Handle type guard predicates on `Array<T>.find`

If the `predicate` function passed to `Array<T>.find` or `ReadonlyArray<T>.find`
is a type guard narrowing `value` to type `S`, then any returned element should also
be narrowed to `S`.

Adding test case and associated baselines

* trailing whitespace after merge conflict
2017-10-09 14:58:41 -07:00
Anders Hejlsberg
884c72efb4 Merge pull request #18654 from Microsoft/strictFunctionTypes
Strict function types
2017-10-02 23:09:17 +01:00
Andy
b883fcbfdd Enable "space-within-parens" lint rule (#18856) 2017-10-02 08:36:26 -07:00
Anders Hejlsberg
0756aa1753 Merge branch 'master' into strictFunctionTypes 2017-09-28 15:39:57 -07:00
Andy
25ad0b5581 Apply "array-type" lint rule (#18699) 2017-09-22 16:14:41 -07:00
Anders Hejlsberg
24698dd353 Revert dom.generated.d.ts and fix duplicate declarations 2017-09-20 13:49:57 -07:00
Zev Spitz
8245597bfe Adds VarDate and SafeArray<T> as pseudonominal types to lib.d.ts (#18566)
* SafeArray<T>; stronger typing for VarDate, and for VBArray and Enumerator constructors

* Add overload to Enumerator based on Item method

* Add return type to Enumerator constructor
2017-09-19 17:04:50 -07:00
Anders Hejlsberg
44cc8c5ffe Use methods in dom.generated.d.ts to opt out of strict checks 2017-09-19 14:23:01 -07:00
Adrian Leonhard
49a73a9686 Removed duplicated JSDoc for TypedArrays and ArrayBuffer. (#18555)
I left the docs in es5.d.ts, as that seems to be the main file.
Fixes #15883
2017-09-18 13:34:03 -07:00
Adrian Leonhard
8c2d79caa6 TypedArrays: fixed find and findIndex callback param obj type. (#18493)
Fixes #18425.
2017-09-18 12:12:08 -07:00
Thomas den Hollander
1ee3b65141 Change typed array signatures (#18367) 2017-09-11 11:22:45 -07:00
Alex Chugaev
de313ff1bd Object.getOwnPropertyDescriptor() returns 'undefined' if property descriptor not found. (#18148) 2017-09-07 10:58:05 -07:00
Taras Mankovski
59aa29b854 Added only the source file (#18175) 2017-09-07 09:15:07 -07:00
Mohamed Hegazy
3d0c239bfd Update generated files (#18173) 2017-08-31 11:42:56 -07:00
Mohamed Hegazy
562abf333a Follow up on #16223 cleaning up Array declarations (#18116)
* Follow up on #16223, Remove generic signatures from Array, ReadOnlyArray and TypedArrays

* Remove test

* Accept baselines

* Remove invalid `this: void` in callbacks

* accept baselines
2017-08-30 10:22:02 -07:00
Mohamed Hegazy
1bae5f2c69 Update generated files (#17995) 2017-08-23 17:08:25 -07:00
Andy
54af8aa945 Array arguments to concat should be ReadonlyArrays (#17806) 2017-08-16 14:32:14 -07:00
Nathan Shively-Sanders
445cc8df79 Merge pull request #17261 from unional/patch-2
Update es5.d.ts
2017-08-09 14:02:32 -07:00
Ron Buckton
813aaf40c0 fix lint errors 2017-08-07 18:20:57 -07:00
Homa Wong
e8f674fafb Update es5.d.ts 2017-07-18 00:58:05 -07:00