Commit Graph
641 Commits
Author SHA1 Message Date
Daniel RosenwasserandGitHub d28e38f573 Revert "make splice deleteCount required in es5.d.ts (#32643)" (#38169)
This reverts commit ddcf139668.
2020-04-24 14:30:28 -07:00
6fbaeeb42f Typo at Uint8Array[Symbol.toStringTag] (#37989)
* Update es2015.symbol.wellknown.d.ts

* Update baselines

Co-authored-by: sirian <sirianru@gmail.com>
2020-04-15 11:40:33 -07:00
BanneretsandGitHub c47aca0da3 Accurate Array.prototype.flat definition (#32131)
* Better Array.prototype.flat definition

* Use more meaningful names

* Rename 'Flat' to 'FlatArray'
2020-04-07 09:16:20 -07:00
Linus UnnebäckandGitHub a98adefd00 Add replacer function overload for replaceAll (#37476) 2020-04-01 16:25:16 -07:00
Stephen HicksandGitHub 6d7539a211 Fix Number.is* to accept unknown again (#34932)
Fixes #34931

This essentially reapplies #24436 which incorrectly updated the generated files rather than the sources, and so was wiped out by 2f73986b44.

Note that this is specifically _not_ the same as #4002, which pertains to the global functions that coerce their arguments and therefore should _not_ accept `unknown`.  This change was already accepted 18 months ago, but was applied incorrectly.
2020-03-27 17:48:45 -04:00
falsandtruandGitHub 7f1df6e53e Fix import order (#37510) 2020-03-26 13:55:56 -07:00
Ron BucktonandGitHub 4fc4c4e3d6 Revert 'awaited' type (#37610) 2020-03-25 18:39:45 -07:00
Nathan Shively-SandersandGitHub a1c8608f68 Revert cloneNode overrides in the DOM (#37568)
* Revert cloneNode overrides in the DOM

See microsoft/TSJS-lib-generator#842

* update baselines
2020-03-24 17:56:27 -07:00
OrtaandGitHub fbd83b848c Bring over last 3.9 dom changes (#37502)
* Bring over last 3.9 dom changes

* Addresses feedback
2020-03-20 17:17:27 -07:00
e3ec7b18b8 Add the 'awaited' type operator (#35998)
* Add the 'awaited' type operator

* Add script to manually add reviewers to a PR when GH 'Suggested Reviewers' breaks

* Fix lint error in review script

* Only defer generic awaited type for possible thenable

* Add variance-like behavior for awaited

* Switch awaited type params to 'unreliable' variance

* fix typo in inferTypes

* LKG without syntax in lib

* LKG with new syntax in lib

* Add 'strictAwaitedTypes' flag

* Treat strictAwaitedTypes as strict-mode flag

* Rename TAll, remove duplicate definition of 'race'

* Apply suggestions from code review

Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>

* Fix inference priority

* Update comment to isGenericAwaitableType

* Add overloads for then/catch to Promise

* Add inference heuristic for T | PromiseLike<T> (for any PromiseLike)

* Remove strictAwaitedTypes flag

Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
2020-03-20 16:09:01 -07:00
Nathan Shively-SandersandGitHub 933c294923 Dom update 2020-03-18 (#37464)
* Copy over DOM updates from TSJS-lib-generator

* update baselines
2020-03-18 16:08:19 -07:00
Nathan Shively-SandersandGitHub 062104d9d5 Simplify return type of Object.fromEntries (#37457)
PropertyKey is accurate but not usable.

Fixes #31393
2020-03-18 14:35:19 -07:00
CaymanandGitHub 4432178ded Add valueOf declarations for TypedArrays (#36668) 2020-03-13 16:50:16 -04:00
ArmanandGitHub 3d76c37cbe More clear comment for String.prototype.match() (#36301)
* More clear comment for String.prototype.match()

* Removed trailing spaces
2020-03-12 14:44:07 -07:00
Tom JenkinsonandGitHub ddcf139668 make splice deleteCount required in es5.d.ts (#32643)
* make splice `deleteCount` required in es5.d.ts

In ES5 `deleteCount` is not an optional argument. If it is not provided it defaults to 0 as a side effect of `undefined` being converted to an integer.

In ES6 `deleleteCount` is optional, and it defaults to the length of the array minus the start index.

If you are targeting ES5 but don't provide `deleteCount` the behaviour will be different depending on the environment your build is running in.

fixes #32638

* update baselines
2020-03-12 14:28:14 -07:00
20625a964b add promise.any (#33844)
* add promise.prototype.any

* add AggregateError

* Update src/lib/esnext.promise.d.ts

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* update baseline again

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-03-11 08:36:00 -07:00
Nathan Shively-SandersandGitHub 0a1af90bb6 add string.prototype.replaceAll (#33845)
* add string.prototype.replaceAll

* accept baseline

* fix bad merge in tests

* update missed baselines

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2020-03-04 13:25:17 -08:00
Lo̹̫̦̥̬̜͈͝n̗͚̼̤ĝ̮̫͎̬̬͕̪ͫ̐̕ ͭ̊H̱̏ͬ̃ͨ̆͗o̱͚͉͉̖̰̪ͯ̈ͪ̈̎̚andGitHub 3b996ded9c fix: Intl.PluralRulesOptions to behave according to spec (#33414)
TL;DR: MDN doc is not accurate: https://github.com/tc39/ecma402/issues/365#issuecomment-530617744

According to spec, `PluralRulesOptions` do take in these extra params (point 2 in https://tc39.es/ecma402/#sec-intl-pluralrules-constructor)

Add LDMLPluralRule according to http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories

ResolvedPluralRulesOptions also have these params as optional because according to spec
https://tc39.es/ecma402/#sec-initializepluralrules
https://tc39.es/ecma402/#sec-setnfdigitoptions
2020-03-02 15:49:44 -08:00
Nathan Shively-SandersandGitHub 8da3eff7b0 Subtypes of ErrorConstructor extend it (#35549)
Previously subtypes of Error extended Error, but the matching subtypes
of ErrorConstructor did not extend ErrorConstructor. The members in
es5.d.ts are identical, so there's no need except for allowing interface
merging into ErrorConstructor to affect subtypes as well.
2020-01-29 13:26:00 -08:00
6f0c6417e8 fix(lib/es2019): Symbol.description may be undefined (#36263)
* fix(lib/es2019): `Symbol.description` may be `undefined`

* Update user baselines (EB-Forks#1)

Co-authored-by: TypeScript Bot <ts_bot@rcavanaugh.com>
2020-01-24 10:06:04 -08:00
Anders HejlsbergandGitHub df3b5bbdab Fix ThisParameterType<T> type (#36013)
* Simplify ThisParameterType<T> type

* Add tests
2020-01-06 08:55:34 -10:00
Nathan Shively-SandersandGitHub 28319a541a CustomElementConstructor: should be construct signature (#36030)
Was previously incorrectly a call signature. Had to override it
manually.
2020-01-06 10:09:03 -08:00
ExE BossandDaniel Rosenwasser 5a342742d0 feat(lib/es2020): Add Promise.allSettled(…) (#34065)
* feat(lib/es2020): Add `Promise.allSettled(…)`

* test(lib): Update tests to account for `es2020.promise`

* fix(lib/es2020): `Promise.allSettled(…)` takes `Iterable` argument

* refactor(lib/es2020): Rename `Promise.allSettled(…)` return type

* feat(lib/es2020): Simplify `Promise.allSettled(…)` type declaration

* refactor(lib/es2020): Improve naming of `Promise.allSettled(…)` types
2020-01-03 12:58:02 -08:00
Nathan Shively-SandersandGitHub bb306a757b Update DOM from TSJS-lib-generator (#35938) 2019-12-31 14:12:18 -08:00
Kagami Sascha RosylightandDaniel Rosenwasser 05a2f1b110 Support bigints in ES2020 (#33874) 2019-12-23 12:18:52 -08:00
Nathan Shively-SandersandGitHub 75301c8e2c DOM update 2019-11-19 (#35207)
* DOM update 2019-11-19

* update baselines

* update more baselines
2019-11-19 15:02:51 -08:00
Nathan Shively-SandersandGitHub 262ec6171d Make ImageData(Uint8ClampedArray)'s 3rd param optional (#34519)
It can be inferred from the first two.

Fixes #33266

Baseline update from microsoft/TSJS-lib-generator#790
2019-10-17 11:14:07 -07:00
Martin JohnsandRyan Cavanaugh 408b17649a doc(lib/es5): Fix grammar in DateConstructor.UTC documentation (#34509)
This fixes #34507.
2019-10-16 08:33:22 -07:00
MartinandRyan Cavanaugh b7c85c7382 Update Math.round in es5.d.ts (#33920)
Update documentation of Math.round to reflect that it turns a float in to an integer and returns an integer.
2019-10-14 10:55:55 -07:00
Ingvar StepanyanandNathan Shively-Sanders 1820df187b Update DOM from TSJS-lib-generator (#33753)
This bumps generated bindings to include https://github.com/microsoft/TSJS-lib-generator/pull/767.

Note that other related APIs were already updated in https://github.com/microsoft/TSJS-lib-generator/pull/755 and https://github.com/microsoft/TSJS-lib-generator/pull/756 and included in current TypeScript beta.

Unfortunately, this one slipped under the radar, but it would be really great to include these changes in beta too for consistency between different WebAssembly methods.
2019-10-14 09:00:33 -07:00
Michael TammandRyan Cavanaugh 6bd3b21f6c fix (lib): Loosen predicate return types of typed arrays, adapt docs (#31343)
fixes #31472
2019-09-30 15:26:39 -07:00
Nathan Shively-SandersandGitHub e72937deff Update DOM (#33627)
* Update DOM

* Update baselines
2019-09-26 17:20:05 -07:00
Orta Therox b544901d5e Merge master 2019-09-25 14:46:36 -04:00
Jack Bates 78057a64ac Allow readonly arguments to Promise.all(), etc. 2019-09-19 11:11:59 -07:00
Ron BucktonandGitHub 344dba8809 Fix incorrect parameter types for AsyncIterator next/return (#33354) 2019-09-17 21:02:12 -07:00
Michal PrzybysandGitHub 63d940da53 Added example of sortFn 2019-09-17 16:32:15 +02:00
Michal PrzybysandGitHub 2c8df45aa9 Fixed typo 2019-09-12 10:17:05 +02:00
Michal PrzybysandGitHub 894eb59be0 Better Array.sort compareFn docs 2019-09-11 13:24:06 +02:00
Alexander T fea9e11174 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-20 11:07:18 +03:00
falsandtruandRyan Cavanaugh 5ae286329f Update String#toLocale{Lower,Upper}Case methods (#32961) 2019-08-19 09:10:12 -07:00
Alexander T b6d981aec8 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-16 12:13:57 +03:00
阿卡琳andRyan Cavanaugh a53e4a19ef Allow to omit the begin parameter of %TypedArray%.prototype.subarray (#32125)
* Allow to omit the begin parameter of %TypedArray%.prototype.subarray

* update baselines
2019-08-15 15:58:24 -07:00
Matthew MillerandRyan Cavanaugh c6a0739dc9 fix(docs): Fixed the docs for Array#slice not spec (#31182)
ifying that the 'end' parameter is exclusive.
2019-08-15 10:28:28 -07:00
Kagami Sascha RosylightandRyan Cavanaugh f304b81fa5 Point es2020 in esnext.d.ts (#32776) 2019-08-15 10:06:46 -07:00
Alexander b3afb55d7a disable array-type for es2019.array.d.ts 2019-08-10 10:37:33 +03:00
Alexander ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03:00
Alexander T 11ec6118fb @typescript-eslint/array-type 2019-07-29 18:39:11 +03:00
Alexander T 949770a4fe @typescript-eslint/triple-slash-reference 2019-07-19 10:30:40 +03:00
Alexander T 36a6028d56 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-19 10:16:10 +03:00
Jake BooneandGitHub c30ba7884c Fix capitalization in parseInt description 2019-07-18 12:38:14 -07:00