diff --git a/CHANGELOG.md b/CHANGELOG.md index 753193e62..981144507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,18 @@ for changes to the build pipeline itself. ## Unreleased +- **Fix: a cut no longer keeps non-Baseline types that only an unused + dictionary refers to.** The reference closure treated every dictionary, + typedef and callback as a live reference, even ones the cut never emits. + So an interface named only by such a value type was kept as a type-only + shell, and so were the value types reachable from it. Example: the 2022 cut + carried `RTCIceCandidatePair` (named by the unused + `RTCIceCandidatePairEventInit`). The closure now follows a value type only + once something emitted reaches it, the same rule the emitter uses. This + drops roughly 85 to 120 unused declarations per cut, such as the WebGPU + object types, `AudioData`, `ClipboardItem`, `URLPattern` and the WebXR space + types. `Transferable` loses `AudioData` and `MediaStreamTrackHandle` in the + cuts where they aren't Baseline. Full (non-cut) builds are unaffected. - **Fix: a cut no longer force-emits value types that nothing references.** Dictionaries, enums, and typedefs named in the manual input files are kept in every scope of a cut so that references hidden inside raw signature diff --git a/baselines/audioworklet.generated.d.ts b/baselines/audioworklet.generated.d.ts index fd1ac49f4..a3b6a5d40 100644 --- a/baselines/audioworklet.generated.d.ts +++ b/baselines/audioworklet.generated.d.ts @@ -992,6 +992,12 @@ declare var ReadableStream: { new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream>; new(underlyingSource: UnderlyingDefaultSource, strategy?: QueuingStrategy): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + /** + * The **`ReadableStream.from()`** static method returns a ReadableStream from a provided iterable or async iterable object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/from_static) + */ + from(asyncIterable: AsyncIterable | Iterable): ReadableStream; }; /** @@ -1684,26 +1690,27 @@ declare namespace WebAssembly { * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory) */ - interface Memory { + interface Memory { /** * The read-only **`buffer`** prototype property of the WebAssembly.Memory object returns the buffer contained in the memory. Depending on whether or not the memory was constructed with shared: true, the buffer is either an ArrayBuffer or a SharedArrayBuffer. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/buffer) */ - readonly buffer: ArrayBuffer; + readonly buffer: TArrayBuffer; /** * The **`grow()`** prototype method of the WebAssembly.Memory object increases the size of the memory instance by a specified number of WebAssembly pages. * * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Memory/grow) */ grow(delta: AddressValue): AddressValue; - toFixedLengthBuffer(): ArrayBuffer; - toResizableBuffer(): ArrayBuffer; + toFixedLengthBuffer(): TArrayBuffer; + toResizableBuffer(): TArrayBuffer; } var Memory: { prototype: Memory; - new(descriptor: MemoryDescriptor): Memory; + new(descriptor: MemoryDescriptor & { shared?: false }): Memory; + new(descriptor: MemoryDescriptor): Memory; }; /** diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 3e28636a8..f7aa89077 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -84,6 +84,10 @@ interface AnimationPlaybackEventInit extends EventInit { timelineTime?: CSSNumberish | null; } +interface AriaNotificationOptions { + priority?: AriaNotifyPriority; +} + interface AssignedNodesOptions { flatten?: boolean; } @@ -372,7 +376,6 @@ interface CanvasRenderingContext2DSettings { alpha?: boolean; colorSpace?: PredefinedColorSpace; desynchronized?: boolean; - toneMapping?: CanvasToneMapping; willReadFrequently?: boolean; } @@ -663,7 +666,6 @@ interface DragEventInit extends MouseEventInit { interface DynamicsCompressorOptions extends AudioNodeOptions { attack?: number; knee?: number; - makeupGain?: number | MakeupGainOptions; ratio?: number; release?: number; threshold?: number; @@ -1098,8 +1100,10 @@ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { } interface GPURequestAdapterOptions { + featureLevel?: string; forceFallbackAdapter?: boolean; powerPreference?: GPUPowerPreference; + xrCompatible?: boolean; } interface GPUSamplerBindingLayout { @@ -1119,8 +1123,14 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { mipmapFilter?: GPUMipmapFilterMode; } +interface GPUShaderModuleCompilationHint { + entryPoint: string; + layout?: GPUPipelineLayout | GPUAutoLayoutMode; +} + interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { code: string; + compilationHints?: GPUShaderModuleCompilationHint[]; } interface GPUStencilFaceState { @@ -1177,6 +1187,7 @@ interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { dimension?: GPUTextureViewDimension; format?: GPUTextureFormat; mipLevelCount?: GPUIntegerCoordinate; + swizzle?: string; usage?: GPUTextureUsageFlags; } @@ -1792,7 +1803,7 @@ interface OfflineAudioCompletionEventInit extends EventInit { } interface OfflineAudioContextOptions { - length?: number | null; + length: number; numberOfChannels?: number; sampleRate: number; } @@ -2182,8 +2193,6 @@ interface RTCConfiguration { iceServers?: RTCIceServer[]; iceTransportPolicy?: RTCIceTransportPolicy; rtcpMuxPolicy?: RTCRtcpMuxPolicy; - rtpHeaderEncryptionPolicy?: RTCRtpHeaderEncryptionPolicy; - targetLatency?: RTCConfigurationTargetLatency; } interface RTCDTMFToneChangeEventInit extends EventInit { @@ -2405,11 +2414,6 @@ interface RTCReceivedRtpStreamStats extends RTCRtpStreamStats { packetsReceived?: number; } -interface RTCResolutionRestriction { - maxHeight?: number; - maxWidth?: number; -} - interface RTCRtcpParameters { cname?: string; reducedSize?: boolean; @@ -2437,27 +2441,21 @@ interface RTCRtpCodingParameters { interface RTCRtpContributingSource { audioLevel?: number; - captureTimestamp?: DOMHighResTimeStamp; rtpTimestamp: number; - senderCaptureTimeOffset?: DOMHighResTimeStamp; source: number; timestamp: DOMHighResTimeStamp; } interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { active?: boolean; - adaptivePtime?: boolean; maxBitrate?: number; maxFramerate?: number; networkPriority?: RTCPriorityType; priority?: RTCPriorityType; - ptime?: number; scaleResolutionDownBy?: number; - scaleResolutionDownTo?: RTCResolutionRestriction; } interface RTCRtpHeaderExtensionCapability { - direction: RTCRtpTransceiverDirection; uri: string; } @@ -2710,7 +2708,6 @@ interface SanitizerConfig { comments?: boolean; dataAttributes?: boolean; elements?: SanitizerElementWithAttributes[]; - javascriptURLs?: boolean; processingInstructions?: SanitizerPI[]; removeAttributes?: SanitizerAttribute[]; removeElements?: SanitizerElement[]; @@ -3710,6 +3707,11 @@ interface ARIAMixin { role: string | null; } +interface ARIANotifyMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/ariaNotify) */ + ariaNotify(announcement: string, options?: AriaNotificationOptions): void; +} + /** * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired. * @@ -12581,7 +12583,7 @@ interface DOMPointReadOnly { */ readonly x: number; /** - * The DOMPointReadOnl**`y`** interface's y property holds the vertical coordinate, y, for a read-only point in space. + * The DOMPointReadOnly interface's **`y`** property holds the vertical coordinate, y, for a read-only point in space. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/y) */ @@ -13263,7 +13265,7 @@ declare var DeviceOrientationEvent: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceOrientationEvent/requestPermission_static) */ - requestPermission(absolute?: boolean): Promise; + requestPermission(): Promise; }; /** Available only in secure contexts. */ @@ -13294,7 +13296,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document) */ -interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { +interface Document extends Node, ARIANotifyMixin, DocumentOrShadowRoot, FontFaceSource, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { /** * The **`URL`** read-only property of the Document interface returns the document location as a string. * @@ -13678,6 +13680,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createElementNS) */ + createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: K): HTMLElementTagNameMap[K]; createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement; createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K]; createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement; @@ -14373,7 +14376,7 @@ interface ElementEventMap { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element) */ -interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTypeChildNode, ParentNode, Slottable { +interface Element extends Node, ARIAMixin, ARIANotifyMixin, Animatable, ChildNode, NonDocumentTypeChildNode, ParentNode, Slottable { /** * The **`attributes`** read-only property of the Element interface returns a live collection of all attribute nodes registered to the specified node. It is a NamedNodeMap, not an Array, so it has no Array methods and the Attr nodes' indexes may differ among browsers. To be more specific, attributes is a key/value pair of strings that represents any information regarding that attribute. * @@ -15792,6 +15795,12 @@ interface FontFace { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/status) */ readonly status: FontFaceLoadStatus; + /** + * The **`stretch`** property of the FontFace interface retrieves or sets how the font stretches. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/stretch) + */ + stretch: string; /** * The **`style`** property of the FontFace interface retrieves or sets the font's style. * @@ -17671,6 +17680,7 @@ interface GlobalEventHandlers { onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/blur_event) */ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDialogElement/cancel_event) */ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/canplay_event) */ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null; @@ -17718,6 +17728,7 @@ interface GlobalEventHandlers { onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */ onerror: OnErrorEventHandler; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; @@ -19526,7 +19537,7 @@ interface HTMLImageElement extends HTMLElement { */ readonly x: number; /** - * The read-onl**`y`** y property of the HTMLImageElement interface indicates the y-coordinate of the element's top border edge relative to the root element's origin. + * The read-only **`y`** property of the HTMLImageElement interface indicates the y-coordinate of the element's top border edge relative to the root element's origin. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/y) */ @@ -21275,6 +21286,12 @@ interface HTMLScriptElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLScriptElement/text) */ text: string; + /** + * The **`textContent`** property of the HTMLScriptElement interface represents the inline text content of the