796 Commits

Author SHA1 Message Date
Ron Buckton
6c9792aa87
Decorators normative changes (#52582) 2023-02-09 14:48:45 -05:00
Nathan Shively-Sanders
0c2fa391a8
Update DOM and baselines (#52328) 2023-01-20 16:19:59 -08:00
Ron Buckton
5b18979697
Implement the Stage 3 Decorators Proposal (#50820) 2023-01-19 17:54:12 -05:00
Nathan Shively-Sanders
ecaf6d91a7
Revert "Add undefined to JSON.stringify return type (#51897)" (#52307) 2023-01-19 09:24:31 -08:00
Mykola Basov
cb4c7689e6
Add Array.prototype.findLast() and Array.prototype.findLastIndex() (#49636)
Signed-off-by: mbasov2 <mbasov2@bloomberg.net>
2023-01-13 15:35:50 -08:00
Ron Buckton
f43cd0acca
Add RegExp indices and hasIndices (#52085)
* Add RegExp indices
* update --lib message
* newlines
* implement changes
* Fix failing tests

Thanks @xiBread!
2023-01-03 15:20:10 -05:00
ronyhe
c7f49bceed
Add undefined to JSON.stringify return type (#51897)
* First attempt

* Revert "First attempt"

This reverts commit 23f641cddbcb6b55eec764eb6b3895beba731c38.

* Second try

* Accept baslines
2022-12-28 09:06:03 -08:00
swandir
f0f415b671
Add missing Intl.ListFormat.prototype.resolvedOptions() (#51024)
* Add missing Intl.ListFormat.prototype.resolvedOptions()

Fixes #51023

* lint
2022-12-08 16:45:17 -08:00
Eyal Halpern Shalev
5435efbf37
Fixed method signature of Atomics.waitAsync (#51602)
* Added method overloading for Atomics.waitAsync(Int32Array, number, number, number)

* fixed types

* fixed types

* fixed line ending

* CR fix

* Forgot the baseline
2022-12-01 16:41:28 -08:00
Charlie Fish
53ef2fc90d
Improving Date.getTime documentation (#51365) 2022-11-15 08:48:20 -08:00
Jonathan Kingston
c0f8d1cf75
fix(51277): Array find thisArg fix from being void (#51278) 2022-11-14 16:49:11 -08:00
Nathan Shively-Sanders
170a17fad5
Dom update 2022-10-25 (#51300)
* Update DOM

Looks like the changes are:

- AbortSignal.abort finally has the right type.
- Add OffscreenCanvas support
- Some new properties scattered around, some properties now allow `null`.
- rename VideoFrameMetadata -> VideoFrameCallbackMetadata
- Add CSSContainerRule, EXT_texture_norm16, OES_draw_buffers_indexed
- Some type aliases include more types in their union.

* Update baselines
2022-10-25 17:04:55 -07:00
Ben Taylor
33a34e5b96
Adding a JSDoc comment to the es5 type declarations to describe the functionality of Date.now() (#50630)
* Adding a JSDoc comment to the es5 type declarations to describe the functionality of Date.now() & updating baselines (50565)

* Update the Date.now() type declaration description

Updating the Date.now() type declaration description to make it clearer and more accurate.

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-10-03 16:31:24 -07:00
navya9singh
b09e93d3f6
Merge pull request #50041 from microsoft/fix/47969
Fix(47969): String.prototypr.replace docs fix
2022-09-28 08:27:24 -07:00
navya9singh
8e71f429c8 Fixing pr comments 2022-09-25 23:12:07 -07:00
Nathan Shively-Sanders
e2dd5084f7
DOM update 2022/09/21 (#50884) 2022-09-21 10:17:08 -07:00
navya9singh
305f4bd420 Merge branch 'main' into fix/47969 2022-09-20 11:50:14 -07:00
navya9singh
906510e0f3 Fixes for pr 2022-09-16 15:36:21 -07:00
DetachHead
2970c5d167
make RegExpExecArray always include index 0 (#50713)
* make `RegExpExecArray` always include index 0

* update baseline

* remove `BaseRegExpArray` interface

* add test

Co-authored-by: DetachHead <detachhead@users.noreply.github.com>
2022-09-16 15:28:26 -07:00
navya9singh
29e50b3149 Rewording documentation 2022-09-16 11:07:15 -07:00
Jake Bailey
8e5e2e08ea
Fix backticks in our JSDoc comments (#50737) 2022-09-12 13:27:49 -07:00
Long Ho
71d1911503
add unknown to DateTimeFormatTypes (#50402)
* add unknown to DateTimeFormatTypes

* move unknown to es2019.intl instead

* Accepted baselines.

Co-authored-by: long.ho <long.ho@cloudkitchens.com>
2022-08-26 13:02:44 -07:00
Kyℓe Hensel
ea36fb3d5f
mark Intl.LocalesArgument as readonly (#50135) 2022-08-18 14:38:41 -07:00
DetachHead
3b80ddca21
fix first match in RegExpMatchArray being possibly undefined when noUncheckedIndexedAccess is enabled (#49682)
* fix first match in `RegExpMatchArray` being possibly undefined when `noUncheckedIndexedAccess` is enabled

* fix tests

* add test

Co-authored-by: DetachHead <detachhead@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-08-16 10:12:12 -07:00
Nicolas Rodriguez
8a873de5cf
fix(49149): remove unneeded array overload to Object.freeze (#50029)
* fix(49149): remove unneeded array overload to Object.freeze

* chore: commit baseline changes

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
2022-08-15 16:10:02 -07:00
Jack Morrison
e5b400c162
Fix misleading Date constructor documentation (addresses #49350) (#49649)
* Update month parameter to monthIndex and add docs for Date constructor

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Add baseline changes

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Fix misleading Date constructor documentation (addresses #49350) (#73)

* Update month parameter to monthIndex and add docs for Date constructor

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Add baseline changes

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Update baselines
2022-08-09 16:21:56 -07:00
ExE Boss
a123fc5ce4
feat(lib/es2015): Add typed overloads to Reflect (#35608)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-08-09 15:05:33 -07:00
Jack Bates
040c1216ff
Better typings for Promise.resolve(), like #31117 (#33074)
* Better typings for Promise.resolve(), like #31117

* Add tests

* Update to Awaited<T>

* Fix issue with Awaited affecting jQuery, additional tests

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2022-08-02 13:39:50 -04:00
navya9singh
472584f9cd Changes to resolve pr comments 2022-07-27 13:18:35 -07:00
Danilo Lekovic
78e2bfd712
Fix(49525): Adds documentation for the Proxy type. (#49674)
* Adds documentation for the Proxy type.

* Removed trailing whitespace.

* Addresses PR feedback.

* Removes trivial comments and adds descriptive names.
2022-07-26 13:25:10 -07:00
navya9singh
34c3b9cf49 Fixed changes to previous commit:
Co-authored-by: graphemecluster <graphemecluster@gmail.com>
2022-07-25 14:26:09 -07:00
navya9singh
04df1e18d9 Follow up changes to es5.d.ts 2022-07-25 12:25:45 -07:00
navya9singh
3cade4ca24 String.prototype.replace docs fix.
Co-authored-by: graphemecluster <graphemecluster@gmail.com>
2022-07-25 11:53:20 -07:00
Nathan Shively-Sanders
2f51a9e859
Update DOM lib for 4.8 RC (#49976) 2022-07-20 11:37:57 -07:00
Gabriel Grubba
4902860302
Fix(49472): Added docs for Set and Map types (#49522)
* wip: started map object

* Feat: Added docs on collection objects

* Accepted baselines.

* Accepted baselines.

* fix: removed unecessary comments

* Adjusted JSDocs as requested

* fix: adjusted more comments

* fix: removed params without description
2022-07-14 16:59:05 -07:00
iamharbie
1f0d0f7c66
Set Error.prototype.cause type to unknown (#70) (#49639)
Signed-off-by: Abdul-Azeez Lawal <abdul-azeez.lawal@outlook.com>
2022-07-05 15:43:43 -07:00
Gabriel Grubba
9f2ab7fc31
Fix(49473): Added docs for RegExpMatchArray (#49499)
* fix: added docs for RegExpMatchArray

* Accepted baselines.

* Accepted missing baselines.

* Accepted missing baselines pt2.
2022-06-21 12:30:07 -07:00
jordanmbell
db49c6c3ba
Add fractionalSecond part type to DateTimeFormat().formatToParts (#49569)
* Add fractionalSecond part type to DateTimeFormat().formatToParts

This change adds the `fractionalSecond` part type as a valid part
to be returned from Intl.DateTimeFormat().formatToParts().

Fixes microsoft#48882

* fixup
2022-06-21 07:52:24 -07:00
Nathan Shively-Sanders
6004b35ce4
Update 4.8 DOM from Typescript-DOM-lib-generator (#49596) 2022-06-17 15:01:44 -07:00
Gabriel Grubba
4c5060181f
Fix(49198): Added missing definition for Atomics.waitAsync and es2022 sharedmemory file (#49204)
* feat(sharedmemory): Added file waitAsync function

* fix: Adjusted promise return type

* Fix(sharedmemory): Addressed PR comments

* Fix: Removed unused @see at sharedmemory

* Feat: Added tests to shared memory

* Fix: fixed ordering in libs.json

* Feat: Added shared memory to line parser

* Update tests es2022SharedMemory.ts as sugested

Co-authored-by: Eyal Halpern Shalev <eyalsh@gmail.com>

* Update es2022SharedMemory.ts

* feat: Accepted baselines

* fix: Adjusted grammar changes in jsdoc

* fix(47821): skip nodes with export modifiers (#47829)

* Use symbolic GitHub Actions Node.js versions (#49403)

* update baselines

Co-authored-by: Eyal Halpern Shalev <eyalsh@gmail.com>
Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
Co-authored-by: Jack Bates <jack@nottheoilrig.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-06-07 08:46:23 -07:00
Anders Hejlsberg
51b346d65a
Improve intersection reduction and CFA for truthy, equality, and typeof checks (#49119)
* Improve reduction of intersection types

* Accept new baselines

* Improve CFA for truthy, equality, and typeof checks

* Accept new baselines

* Remove special case for Function type

* Don't reduce intersections of form {...} & object

* Accept new baselines

* Anything is assignable to unknown-like union

* Accept new baselines

* Tweak subtype check

* Recombine unknown type from unknown-like union in more cases

* Display union origin only if it is shorter than union itself

* Accept new baselines

* Add tests

* Only attach origin type when it is shorter than union itself

* Specially preserve string & {}, number & {}, bigint & {}

* Accept new baselines

* Add additional tests

* Fix getNormalizedType and getNarrowableTypeForReference for intersections

* Switch NonNullable<T> to use T & {}

* Accept new baselines

* Use NonNullable<T> in place of anonymous T & {}

* Accept new baselines

* Add fourslash test

* More fourslash tests

* Fix getFalsyFlags handling of intersections

* Accept new baselines

* Add constraint to compareProperties type parameter

* Unconstrained type parameter not assignable to {} with strictNullChecks

* Accept new baselines
2022-05-27 14:02:54 -07:00
Nathan Shively-Sanders
006ae339bf
Add es2018.intl ref to es2020.intl (#49152)
* Add es2018.intl ref to es2020.intl

es2020.intl refers to NumberFormatPartTypes declared in es2018.intl
as of #46508.

I'm not sure how to test this; it repros on Definitely Typed in
types/ndarray, but when I copy the same files into a compiler test it
passes without a problem.

* Add a test that shows the change works

It doesn't actually show that the original bug has been fixed,
though.
2022-05-20 11:04:34 -07:00
Justin Grant
8bf45a4f93
fix: update types for RTF.p.formatToParts() result (#46508)
This commit updates the type of `RelativeTimeFormatPart` to clarify that
the `unit` prop is always singular, unlike the plural or singular values
that are accepted as inputs.

This also changes `RelativeTimeFormatPart` to be a discriminated
union type because the `unit` prop is only present if the `type` prop's
value is not "literal".

Fixes #46245
2022-05-10 16:06:08 -07:00
mstssk
fcd80db0c6
fix(48912): fractionalSecondDigits is 1, 2 or 3. (#49042) 2022-05-10 09:22:50 -07:00
Devon Govett
17431eab46
Add missing source property to Intl formatRangeToParts methods (#48754) 2022-05-09 15:57:42 -07:00
ryohei.udagawa
c1c3ebcadf
fix: fractionalSecondDigits configure (#49014) 2022-05-09 15:24:24 -07:00
Kenta Moriuchi
4a0b083c69
Add ES2022 Intl.Segmenter type (#48800)
* Add `Intl.Segmenter` type

* Update baseline

* Fix useless generics

* Fix indent size

* Fix `ResolvedSegmenterOptions`
2022-05-05 17:09:06 -07:00
BrandonXLF
ad2b7a6d31
Document encodeURIComponent/encodeURI's argument as unencoded (#48803) 2022-05-04 08:13:46 -07:00
那里好脏不可以
bb887ea1f2
fix(48557): Add missing JSDoc parameters (#48560)
* Fix jsdoc of some `DataView` method.

* Add author by 'Fix jsdoc of some `DataView` method'.

* Fix jsdoc of some `DataView` method.

change 'written' to 'read' by `getXXX` methods, and remove 'otherwise' by every method which has `littleEndian` param.

* Fix jsdoc of some `DataView` method in `es2020.bigint.d.ts`.

change 'written' to 'read' by `getXXX` methods, and remove 'otherwise' by every method which has `littleEndian` param.
2022-05-02 13:21:37 -07:00
Nathan Shively-Sanders
16b6f0f533
manually update webworker to remove AbortSignal.abort (#48580) 2022-04-05 17:08:17 -07:00