Commit Graph

433 Commits

Author SHA1 Message Date
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
Kanchalai Tanglertsampan feefd520b6 Reorder promise.all signatures 2017-06-22 11:51:00 -07:00
Mohamed Hegazy a3f39ece62 Fix #16521: mark thisArg as optional in typed array map function (#16526) 2017-06-14 11:58:21 -07:00
Mohamed Hegazy c8d33bc38e Update generated files 2017-06-07 22:17:40 -07:00
Mohamed Hegazy a76b4b1f28 Array cleanup (#16223)
* Fix for #13840: Remove map tuple overloads

* Coalesce signatures on array that use this args

* Remove generic signatures

* Add comments to toLocalString

* clean up typed array interfaces
2017-06-04 14:26:18 -07:00
Donald Pipowitch f309996b32 added es2017.intl (#15369) 2017-05-24 09:50:38 -07:00
Mohamed Hegazy 1f8cf313e1 Port lib changes 5 22 2017 (#16005)
* Port lib changes

* Update LKG
2017-05-22 16:12:55 -07:00
Ron Buckton 578826cd61 Adds definitions for the es2017 Atomics global object 2017-05-10 17:19:26 -07:00
Mohamed Hegazy 888e264eda Merge pull request #15694 from astegmaier/patch-1
getOwnPropertyDescriptor return should allow undefined
2017-05-09 10:55:49 -07:00
Andrew Stegmaier ccec13aaf1 getOwnPropertyDescriptor return should allow undefined
getOwnPropertyDescriptor _should_ return undefined in certain situations. This is documented here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor

This change addresses https://github.com/Microsoft/TypeScript/issues/14923 and https://github.com/Microsoft/TypeScript/issues/10904. The original fix to 14923 was to the /lib/lib.es2015.proxy.d.ts file instead of /src/lib/lib.es2015.proxy.d.ts (see: https://github.com/Microsoft/TypeScript/pull/10550/commits). I think this meant that the change got over-written by a generation script (see note here: https://github.com/Microsoft/TypeScript/tree/master/lib)
2017-05-08 23:56:29 -07:00
Peter Burns 0e74053abc Add missing space. 2017-04-28 12:50:35 -07:00
Peter Burns 721f229b0b Declare iterable methods for Readonly collections.
https://github.com/Microsoft/TypeScript/pull/10921 added readonly maps and sets, similar to ReadonlyArray.

This adds the iterator methods [Symbol.iterator], keys(), values(), and entries() to them as well.
2017-04-24 10:42:48 -07:00
Mohamed Hegazy bb8a875e71 Merge pull request #15050 from YuichiNukiyama/add_headers_iteratableiterator
Fix Headers interface
2017-04-24 09:27:00 -07:00
Yuichi Nukiyama 2713501298 fix mistake 2017-04-25 00:02:33 +09:00
Yuichi Nukiyama 1fb010e7f8 add Symbol.iterator 2017-04-24 23:42:23 +09:00
Herrington Darkholme ab7d5ee8c7 add missing methods 2017-04-21 09:38:55 +08:00
Herrington Darkholme 13afdb81e8 fix #15243: add URLSearchParams to iterable 2017-04-20 10:20:58 +08:00
Mohamed Hegazy 552f1d85c9 Revert changes to WeakSet defitions adding object constraint
This reverts the changes to WeakSet done in https://github.com/Microsoft/TypeScript/pull/15124 to avoid breaks in existing @types packages like @types/lodash
2017-04-19 13:55:13 -07:00
Reiner Dolp eb36455c8b fix issue 15275 2017-04-19 19:37:37 +01:00