Skip to content

fix: Mark prototype property of constructors as readonly #968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions baselines/audioworklet.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ interface AbortController {
}

declare var AbortController: {
prototype: AbortController;
readonly prototype: AbortController;
new(): AbortController;
};

Expand Down Expand Up @@ -232,7 +232,7 @@ interface AbortSignal extends EventTarget {
}

declare var AbortSignal: {
prototype: AbortSignal;
readonly prototype: AbortSignal;
new(): AbortSignal;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
abort(reason?: any): AbortSignal;
Expand All @@ -253,7 +253,7 @@ interface AudioWorkletGlobalScope extends WorkletGlobalScope {
}

declare var AudioWorkletGlobalScope: {
prototype: AudioWorkletGlobalScope;
readonly prototype: AudioWorkletGlobalScope;
new(): AudioWorkletGlobalScope;
};

Expand All @@ -264,7 +264,7 @@ interface AudioWorkletProcessor {
}

declare var AudioWorkletProcessor: {
prototype: AudioWorkletProcessor;
readonly prototype: AudioWorkletProcessor;
new(): AudioWorkletProcessor;
};

Expand All @@ -285,7 +285,7 @@ interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
}

declare var ByteLengthQueuingStrategy: {
prototype: ByteLengthQueuingStrategy;
readonly prototype: ByteLengthQueuingStrategy;
new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
};

Expand All @@ -296,7 +296,7 @@ interface CompressionStream extends GenericTransformStream {
}

declare var CompressionStream: {
prototype: CompressionStream;
readonly prototype: CompressionStream;
new(format: CompressionFormat): CompressionStream;
};

Expand All @@ -313,7 +313,7 @@ interface CountQueuingStrategy extends QueuingStrategy {
}

declare var CountQueuingStrategy: {
prototype: CountQueuingStrategy;
readonly prototype: CountQueuingStrategy;
new(init: QueuingStrategyInit): CountQueuingStrategy;
};

Expand All @@ -334,7 +334,7 @@ interface CustomEvent<T = any> extends Event {
}

declare var CustomEvent: {
prototype: CustomEvent;
readonly prototype: CustomEvent;
new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
};

Expand Down Expand Up @@ -382,7 +382,7 @@ interface DOMException extends Error {
}

declare var DOMException: {
prototype: DOMException;
readonly prototype: DOMException;
new(message?: string, name?: string): DOMException;
readonly INDEX_SIZE_ERR: 1;
readonly DOMSTRING_SIZE_ERR: 2;
Expand Down Expand Up @@ -418,7 +418,7 @@ interface DecompressionStream extends GenericTransformStream {
}

declare var DecompressionStream: {
prototype: DecompressionStream;
readonly prototype: DecompressionStream;
new(format: CompressionFormat): DecompressionStream;
};

Expand All @@ -436,7 +436,7 @@ interface ErrorEvent extends Event {
}

declare var ErrorEvent: {
prototype: ErrorEvent;
readonly prototype: ErrorEvent;
new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
};

Expand Down Expand Up @@ -561,7 +561,7 @@ interface Event {
}

declare var Event: {
prototype: Event;
readonly prototype: Event;
new(type: string, eventInitDict?: EventInit): Event;
readonly NONE: 0;
readonly CAPTURING_PHASE: 1;
Expand Down Expand Up @@ -616,7 +616,7 @@ interface EventTarget {
}

declare var EventTarget: {
prototype: EventTarget;
readonly prototype: EventTarget;
new(): EventTarget;
};

Expand Down Expand Up @@ -668,7 +668,7 @@ interface MessageEvent<T = any> extends Event {
}

declare var MessageEvent: {
prototype: MessageEvent;
readonly prototype: MessageEvent;
new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
};

Expand Down Expand Up @@ -715,7 +715,7 @@ interface MessagePort extends EventTarget {
}

declare var MessagePort: {
prototype: MessagePort;
readonly prototype: MessagePort;
new(): MessagePort;
};

Expand All @@ -728,7 +728,7 @@ interface PromiseRejectionEvent extends Event {
}

declare var PromiseRejectionEvent: {
prototype: PromiseRejectionEvent;
readonly prototype: PromiseRejectionEvent;
new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
};

Expand All @@ -747,7 +747,7 @@ interface ReadableByteStreamController {
}

declare var ReadableByteStreamController: {
prototype: ReadableByteStreamController;
readonly prototype: ReadableByteStreamController;
new(): ReadableByteStreamController;
};

Expand All @@ -774,7 +774,7 @@ interface ReadableStream<R = any> {
}

declare var ReadableStream: {
prototype: ReadableStream;
readonly prototype: ReadableStream;
new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }): ReadableStream<Uint8Array>;
new<R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
Expand All @@ -789,7 +789,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
}

declare var ReadableStreamBYOBReader: {
prototype: ReadableStreamBYOBReader;
readonly prototype: ReadableStreamBYOBReader;
new(stream: ReadableStream<Uint8Array>): ReadableStreamBYOBReader;
};

Expand All @@ -804,7 +804,7 @@ interface ReadableStreamBYOBRequest {
}

declare var ReadableStreamBYOBRequest: {
prototype: ReadableStreamBYOBRequest;
readonly prototype: ReadableStreamBYOBRequest;
new(): ReadableStreamBYOBRequest;
};

Expand All @@ -821,7 +821,7 @@ interface ReadableStreamDefaultController<R = any> {
}

declare var ReadableStreamDefaultController: {
prototype: ReadableStreamDefaultController;
readonly prototype: ReadableStreamDefaultController;
new(): ReadableStreamDefaultController;
};

Expand All @@ -834,7 +834,7 @@ interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericRead
}

declare var ReadableStreamDefaultReader: {
prototype: ReadableStreamDefaultReader;
readonly prototype: ReadableStreamDefaultReader;
new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
};

Expand Down Expand Up @@ -870,7 +870,7 @@ interface TextDecoder extends TextDecoderCommon {
}

declare var TextDecoder: {
prototype: TextDecoder;
readonly prototype: TextDecoder;
new(label?: string, options?: TextDecoderOptions): TextDecoder;
};

Expand Down Expand Up @@ -902,7 +902,7 @@ interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
}

declare var TextDecoderStream: {
prototype: TextDecoderStream;
readonly prototype: TextDecoderStream;
new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
};

Expand All @@ -927,7 +927,7 @@ interface TextEncoder extends TextEncoderCommon {
}

declare var TextEncoder: {
prototype: TextEncoder;
readonly prototype: TextEncoder;
new(): TextEncoder;
};

Expand All @@ -947,7 +947,7 @@ interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
}

declare var TextEncoderStream: {
prototype: TextEncoderStream;
readonly prototype: TextEncoderStream;
new(): TextEncoderStream;
};

Expand All @@ -960,7 +960,7 @@ interface TransformStream<I = any, O = any> {
}

declare var TransformStream: {
prototype: TransformStream;
readonly prototype: TransformStream;
new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
};

Expand All @@ -977,7 +977,7 @@ interface TransformStreamDefaultController<O = any> {
}

declare var TransformStreamDefaultController: {
prototype: TransformStreamDefaultController;
readonly prototype: TransformStreamDefaultController;
new(): TransformStreamDefaultController;
};

Expand Down Expand Up @@ -1017,7 +1017,7 @@ interface URL {
}

declare var URL: {
prototype: URL;
readonly prototype: URL;
new(url: string | URL, base?: string | URL): URL;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
canParse(url: string | URL, base?: string | URL): boolean;
Expand Down Expand Up @@ -1073,7 +1073,7 @@ interface URLSearchParams {
}

declare var URLSearchParams: {
prototype: URLSearchParams;
readonly prototype: URLSearchParams;
new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
};

Expand All @@ -1086,7 +1086,7 @@ interface WorkletGlobalScope {
}

declare var WorkletGlobalScope: {
prototype: WorkletGlobalScope;
readonly prototype: WorkletGlobalScope;
new(): WorkletGlobalScope;
};

Expand All @@ -1107,7 +1107,7 @@ interface WritableStream<W = any> {
}

declare var WritableStream: {
prototype: WritableStream;
readonly prototype: WritableStream;
new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
};

Expand All @@ -1124,7 +1124,7 @@ interface WritableStreamDefaultController {
}

declare var WritableStreamDefaultController: {
prototype: WritableStreamDefaultController;
readonly prototype: WritableStreamDefaultController;
new(): WritableStreamDefaultController;
};

Expand All @@ -1151,7 +1151,7 @@ interface WritableStreamDefaultWriter<W = any> {
}

declare var WritableStreamDefaultWriter: {
prototype: WritableStreamDefaultWriter;
readonly prototype: WritableStreamDefaultWriter;
new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
};

Expand Down Expand Up @@ -1205,7 +1205,7 @@ declare namespace WebAssembly {
}

var CompileError: {
prototype: CompileError;
readonly prototype: CompileError;
new(message?: string): CompileError;
(message?: string): CompileError;
};
Expand All @@ -1217,7 +1217,7 @@ declare namespace WebAssembly {
}

var Global: {
prototype: Global;
readonly prototype: Global;
new<T extends ValueType = ValueType>(descriptor: GlobalDescriptor<T>, v?: ValueTypeMap[T]): Global<T>;
};

Expand All @@ -1228,15 +1228,15 @@ declare namespace WebAssembly {
}

var Instance: {
prototype: Instance;
readonly prototype: Instance;
new(module: Module, importObject?: Imports): Instance;
};

interface LinkError extends Error {
}

var LinkError: {
prototype: LinkError;
readonly prototype: LinkError;
new(message?: string): LinkError;
(message?: string): LinkError;
};
Expand All @@ -1250,7 +1250,7 @@ declare namespace WebAssembly {
}

var Memory: {
prototype: Memory;
readonly prototype: Memory;
new(descriptor: MemoryDescriptor): Memory;
};

Expand All @@ -1259,7 +1259,7 @@ declare namespace WebAssembly {
}

var Module: {
prototype: Module;
readonly prototype: Module;
new(bytes: BufferSource): Module;
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/customSections_static) */
customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
Expand All @@ -1273,7 +1273,7 @@ declare namespace WebAssembly {
}

var RuntimeError: {
prototype: RuntimeError;
readonly prototype: RuntimeError;
new(message?: string): RuntimeError;
(message?: string): RuntimeError;
};
Expand All @@ -1291,7 +1291,7 @@ declare namespace WebAssembly {
}

var Table: {
prototype: Table;
readonly prototype: Table;
new(descriptor: TableDescriptor, value?: any): Table;
};

Expand Down
Loading