Skip to content

Commit b94bd41

Browse files
committed
0.4.1
1 parent a08c543 commit b94bd41

6 files changed

Lines changed: 96 additions & 3 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,4 @@ The type declarations in this repository include the following specifications (g
135135
- [Global Privacy Control](https://privacycg.github.io/gpc-spec/)
136136
- [TC39](https://tc39.es):
137137
- [Array.fromAsync](https://tc39.es/proposal-array-from-async/)
138-
- [Array Grouping](https://tc39.es/proposal-array-grouping/)
139138
- [ECMAScript Language Specification](https://tc39.es/ecma262/)

css-houdini/typed-om.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
// CSS Typed OM Level 1
3+
// Specification: https://drafts.css-houdini.org/css-typed-om-1/
4+
// Repository: https://github.com/w3c/css-houdini-drafts/tree/main/css-typed-om
5+
6+
// This file only defines the CSS.in() function for completeness, which is left out in the lib.dom.d.ts definitions
7+
// https://drafts.css-houdini.org/css-typed-om/#dom-css-in
8+
9+
declare namespace CSS {
10+
function _in(value: number): CSSUnitValue;
11+
export { _in as in };
12+
}

csswg/cssom.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Specification: https://drafts.csswg.org/cssom-1/
44
// Repository: https://github.com/w3c/csswg-drafts/tree/main/cssom-1
55

6-
// This file is auto-generated from my CSS properties index (http://localhost/webindex/css.html).
6+
// This file is auto-generated from my CSS properties index (https://benjaminaster.com/webindex/css.html).
77
// The properties already in TypeScript's standard type declarations were removed.
88

99
interface CSSStyleDeclaration {

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
/// <reference path="./worker.d.ts" />
77

8+
/// <reference path="./css-houdini/typed-om.d.ts" />
89
/// <reference path="./css-houdini/worklet-animation.d.ts" />
910
/// <reference path="./css-houdini/worklets.d.ts" />
1011

tc39/esnext.d.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
// ECMAScript Language Specification
3-
// Specification: https://tc39.es/ecma262/
3+
// Specification: https://tc39.es/ecma262/multipage/
44
// Repository: https://github.com/tc39/ecma262
55

66
// Fundamental Objects
@@ -10,7 +10,47 @@ interface ObjectConstructor {
1010
groupBy<T>(array: T[], callback: (item: T, index?: number) => string): Record<string, T[]>;
1111
}
1212

13+
// Text Processing
14+
// https://tc39.es/ecma262/multipage/text-processing.html
15+
16+
interface String {
17+
isWellFormed(): boolean;
18+
toWellFormed(): string;
19+
}
20+
21+
interface RegExp {
22+
readonly unicodeSets: boolean;
23+
}
24+
25+
// Keyed Collections
26+
// https://tc39.es/ecma262/multipage/keyed-collections.html
27+
1328
interface MapConstructor {
1429
groupBy<T, K>(array: T[], callback: (item: T, index?: number) => K): Map<K, T[]>;
1530
}
1631

32+
// Structured Data
33+
// https://tc39.es/ecma262/multipage/structured-data.html
34+
35+
interface ArrayBuffer {
36+
readonly maxByteLength: number;
37+
readonly resizable: boolean;
38+
resize(newLength: number): void;
39+
}
40+
41+
interface SharedArrayBuffer {
42+
grow(newLength: number): void;
43+
readonly growable: boolean;
44+
readonly maxByteLength: number;
45+
}
46+
47+
// Control Abstraction Objects
48+
// https://tc39.es/ecma262/multipage/control-abstraction-objects.html
49+
50+
interface PromiseConstructor {
51+
withResolvers<T = any>(): {
52+
promise: Promise<T>;
53+
resolve: (value?: T | PromiseLike<T>) => void;
54+
reject: (reason?: any) => void;
55+
};
56+
}

test.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,51 @@ Object.fromEntries
1515

1616
Map.toString
1717

18+
Promise.allSettled
1819

20+
ArrayBuffer.prototype
21+
22+
SharedArrayBuffer.prototype
23+
24+
let buffer = new ArrayBuffer(5)
25+
buffer.resize(10)
26+
27+
let sab = new SharedArrayBuffer(10)
28+
sab.growable && sab.grow(20)
29+
30+
"".charCodeAt(0)
31+
"".toWellFormed()
32+
"".isWellFormed()
33+
34+
;[].toReversed
35+
;[].toSorted
36+
;[].toSpliced
37+
;[].with
38+
Uint8Array.prototype.toReversed
39+
Uint8Array.prototype.toSorted
40+
Uint8Array.prototype.with
41+
42+
new Promise<void>((res, rej) => {
43+
res()
44+
})
45+
46+
let { promise, resolve, reject } = Promise.withResolvers();
47+
{
48+
let { promise, resolve, reject } = Promise.withResolvers<number>();
49+
}
1950

2051
CSS.lvmin
2152

53+
CSS.in
54+
CSS.vi
55+
56+
57+
StylePropertyMapReadOnly
58+
59+
let a: CSSUnparsedSegment
60+
61+
CSSMathSum
62+
2263
new DecompressionStream("deflate-raw");
2364

2465
window.DeviceMotionEvent.requestPermission();

0 commit comments

Comments
 (0)