Commit Graph
481 Commits
Author SHA1 Message Date
Anders HejlsbergandGitHub 0179d97403 Merge pull request #23592 from Microsoft/improveIndexTypes
Support number and symbol named properties with keyof and mapped types
2018-04-23 13:22:56 -07:00
Ron Buckton 6aab09a82f Revert change to PromiseConstructor in #22772 2018-04-19 11:42:57 -07:00
Ron BucktonandGitHub f7163a0a75 Merge pull request #23466 from falsandtru/lib/Promise.reject
Fix Promise.reject
2018-04-18 15:51:15 -07:00
falsandtru 55a3c22d43 Revert "Improve PromiseConstructor"
This reverts commit 4318f0d9a0.
2018-04-19 05:11:00 +09:00
falsandtru 0303d14a1f Merge remote-tracking branch 'master/master' into lib/promise 2018-04-18 12:05:32 +09:00
falsandtru 4318f0d9a0 Improve PromiseConstructor 2018-04-18 11:45:01 +09:00
falsandtru 563660a83a Revert the change of PromiseLikeConstructor 2018-04-18 11:22:22 +09:00
falsandtru 6798d56472 Fix Promise.reject 2018-04-17 23:08:06 +09:00
Anders Hejlsberg 16cd5580a6 Merge branch 'master' into improveIndexTypes
# Conflicts:
#	src/compiler/checker.ts
#	src/server/utilities.ts
2018-04-16 16:18:29 -07:00
Anders Hejlsberg 68ce69a351 Move 'PropertyKey' from es2015.core.d.ts to es5.d.ts 2018-04-09 07:45:55 -10:00
Holger JerominandGitHub c3d8ec0ee2 refactor: use union type in DateConstructor 2018-04-06 11:27:20 +02:00
Mohamed Hegazy 460df57ce5 Port generated lib files 2018-04-04 15:19:32 -07:00
Mohamed Hegazy f29a51fd2e Port generated lib files 2018-04-02 10:12:03 -07:00
Mohamed HegazyandGitHub 24dbc9e2eb Merge pull request #22506 from EcoleKeine/patch-2
Fix some Constructor's signature missing null type
2018-03-29 15:41:41 -07:00
Mohamed Hegazy 272aba1c7d Port generated lib files 2018-03-28 13:26:10 -07:00
falsandtru 4c4f0e8e65 Fix Promise interfaces 2018-03-22 06:02:18 +09:00
EcoleKeineandGitHub e7a3d4b192 Some Constructor's signature missing null type
according to ECMAScript® 2015 Language Specification - http://www.ecma-international.org/ecma-262/6.0

MapConstructor : 23.1.1.1 step6
WeakMapConstructor : 23.2.1.1 step6
SetConstructor : 23.3.1.1 step6
WeakSetConstructor : 23.4.1.1 step6
2018-03-14 00:11:43 +08:00
Mohamed Hegazy 88fc88120c Port generated lib files 2018-03-09 14:06:14 -08:00
Mohamed HegazyandGitHub 3480bf2eb9 Port generated lib files (#22437)
* Port generated lib files

* Update line breaks
2018-03-09 09:05:28 -08:00
Mohamed HegazyandGitHub 963acb3c02 Port generated lib files (#22381)
* Port generated lib files

* Accept baselines
2018-03-07 14:41:32 -08:00
Yuichi NukiyamaandMohamed Hegazy 25525bc9d6 Change esnext.promise to es2018.promise (#22292)
* change esnest.promise to es2018.promise

* modify unit tests

* resolve conflict

* resolve conflict
2018-03-02 17:08:36 -08:00
Yuichi NukiyamaandMohamed Hegazy c7f65e8725 support groups property (#22176)
* support groups property

* fix option unittests
2018-03-01 12:58:25 -08:00
Mohamed HegazyandGitHub f95b9bc65d Port generated lib files (#22003)
* Port generated lib files

* Port generated lib files
2018-02-16 15:53:44 -08:00
Priyantha LankapuraandMohamed Hegazy 80464e8ff1 fix typo in intellisense (#21914) 2018-02-13 18:52:33 -08:00
Anders Hejlsberg 2cc1d735ec Add Required<T> to lib.d.ts 2018-02-13 06:47:52 -08:00
Mohamed HegazyandGitHub c9a0b7ec5b Port generated lib files (#21889) 2018-02-12 11:53:03 -08:00
Anders Hejlsberg 2aba29fc32 Add Exclude, Extract, NonNullable, ReturnType, and InstanceType types 2018-02-09 14:22:46 -08:00
Alan AgiusandMohamed Hegazy 7b9ceb85fa refactor: use union type in DateConstructor (#21757)
* refactor: use union type in `DateConstructor`

Add support for union types in `DateConstructor`

This will add support for something like the below;
`
let date; string | number;
const date = new Date(x);
`

Closes: #21758

* fix: date constructor can't be passed `string | Date`, but takes either individually

Closes: #20900
2018-02-08 12:22:37 -08:00
Herrington DarkholmeandMohamed Hegazy abe814f473 remove GeneratorFunction global from lib.d.ts (#21615) 2018-02-06 09:07:00 -08:00
Nathan Shively-SandersandGitHub be0fcd5174 Array.concat now takes ConcatArray, not ReadonlyArray (#21462)
* Overloads in Array.concat now handle ReadonlyArray

Previously it was union types, which is slower.

* Make arrayConcat3 test stricter

* Switch to InputArray instead of adding overloads

* Update baselines

* Update baselines correctly

* Rename to ConcatArray and add slice method

Should make it, respectively, easier to understand this specific type
and harder to satisfy it by mistake.
2018-02-02 13:20:40 -08:00
Mohamed HegazyandGitHub 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
falsandtruandMohamed Hegazy da593ca7a8 Fix WeakSet interface (#19756) 2018-01-09 22:06:06 -08:00
AndyandMohamed Hegazy 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
benbraouandMohamed Hegazy 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 HegazyandGitHub 00d4acaad2 Port generated lib files (#21076) 2018-01-08 14:57:31 -08:00
Jing MaandMohamed Hegazy 16a882eb8b Optimized annotation according to Spec (#19906) 2018-01-08 13:44:49 -08:00
AndyandGitHub fd5ed5ac79 Have Set and Map constructors take ReadonlyArrays (#20606) 2018-01-08 11:39:52 -08:00
Mohamed HegazyandGitHub c51dfa5596 Port generated lib files (#21071) 2018-01-08 10:35:13 -08:00
benbraouandMohamed Hegazy 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 RosenwasserandGitHub 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 RosenwasserandGitHub 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
AndyandGitHub 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
benbraouandMohamed Hegazy 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 HegazyandGitHub d62a8beea0 Port generated lib files (#20213) 2017-11-22 15:42:04 -08:00
Mohamed HegazyandGitHub cc7b46bb75 Port generated lib files (#20177)
* Port generated lib files

* Accept baselines
2017-11-20 17:28:38 -08:00
Wilson HobbsandMohamed Hegazy 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 LeonhardandMohamed Hegazy 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