mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 22:51:14 +00:00
chore: add code generation for @types/deno (#25545)
This commit is contained in:
parent
e1c8d2755e
commit
33f169beb9
19 changed files with 485 additions and 356 deletions
21
cli/tsc/dts/lib.deno.ns.d.ts
vendored
21
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* @category Platform
|
||||
*/
|
||||
declare interface ImportMeta {
|
||||
interface ImportMeta {
|
||||
/** A string representation of the fully qualified module URL. When the
|
||||
* module is loaded locally, the value will be a file URL (e.g.
|
||||
* `file:///path/module.ts`).
|
||||
|
@ -89,7 +89,7 @@ declare interface ImportMeta {
|
|||
*
|
||||
* @category Performance
|
||||
*/
|
||||
declare interface Performance {
|
||||
interface Performance {
|
||||
/** Stores a timestamp with the associated name (a "mark"). */
|
||||
mark(markName: string, options?: PerformanceMarkOptions): PerformanceMark;
|
||||
|
||||
|
@ -109,7 +109,7 @@ declare interface Performance {
|
|||
*
|
||||
* @category Performance
|
||||
*/
|
||||
declare interface PerformanceMarkOptions {
|
||||
interface PerformanceMarkOptions {
|
||||
/** Metadata to be included in the mark. */
|
||||
// deno-lint-ignore no-explicit-any
|
||||
detail?: any;
|
||||
|
@ -126,7 +126,7 @@ declare interface PerformanceMarkOptions {
|
|||
*
|
||||
* @category Performance
|
||||
*/
|
||||
declare interface PerformanceMeasureOptions {
|
||||
interface PerformanceMeasureOptions {
|
||||
/** Metadata to be included in the measure. */
|
||||
// deno-lint-ignore no-explicit-any
|
||||
detail?: any;
|
||||
|
@ -317,6 +317,7 @@ declare namespace Deno {
|
|||
*
|
||||
* @category Errors */
|
||||
export class NotADirectory extends Error {}
|
||||
|
||||
/**
|
||||
* Raised when trying to perform an operation while the relevant Deno
|
||||
* permission (like `--allow-read`) has not been granted.
|
||||
|
@ -326,6 +327,8 @@ declare namespace Deno {
|
|||
*
|
||||
* @category Errors */
|
||||
export class NotCapable extends Error {}
|
||||
|
||||
export {}; // only export exports
|
||||
}
|
||||
|
||||
/** The current process ID of this instance of the Deno CLI.
|
||||
|
@ -5407,7 +5410,9 @@ declare namespace Deno {
|
|||
*
|
||||
* @category FFI
|
||||
*/
|
||||
export type NativeStructType = { readonly struct: readonly NativeType[] };
|
||||
export interface NativeStructType {
|
||||
readonly struct: readonly NativeType[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @category FFI
|
||||
|
@ -5700,7 +5705,9 @@ declare namespace Deno {
|
|||
*
|
||||
* @category FFI
|
||||
*/
|
||||
export type PointerObject<T = unknown> = { [brand]: T };
|
||||
export interface PointerObject<T = unknown> {
|
||||
[brand]: T;
|
||||
}
|
||||
|
||||
/** Pointers are represented either with a {@linkcode PointerObject}
|
||||
* object or a `null` if the pointer is null.
|
||||
|
@ -6137,4 +6144,6 @@ declare namespace Deno {
|
|||
| CreateHttpClientOptions
|
||||
| (CreateHttpClientOptions & TlsCertifiedKeyPem),
|
||||
): HttpClient;
|
||||
|
||||
export {}; // only export exports
|
||||
}
|
||||
|
|
42
cli/tsc/dts/lib.deno.shared_globals.d.ts
vendored
42
cli/tsc/dts/lib.deno.shared_globals.d.ts
vendored
|
@ -413,7 +413,7 @@ declare function clearInterval(id?: number): void;
|
|||
declare function clearTimeout(id?: number): void;
|
||||
|
||||
/** @category Platform */
|
||||
declare interface VoidFunction {
|
||||
interface VoidFunction {
|
||||
(): void;
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,7 @@ declare function queueMicrotask(func: VoidFunction): void;
|
|||
declare function dispatchEvent(event: Event): boolean;
|
||||
|
||||
/** @category Platform */
|
||||
declare interface DOMStringList {
|
||||
interface DOMStringList {
|
||||
/** Returns the number of strings in strings. */
|
||||
readonly length: number;
|
||||
/** Returns true if strings contains string, and false otherwise. */
|
||||
|
@ -456,13 +456,13 @@ declare interface DOMStringList {
|
|||
}
|
||||
|
||||
/** @category Platform */
|
||||
declare type BufferSource = ArrayBufferView | ArrayBuffer;
|
||||
type BufferSource = ArrayBufferView | ArrayBuffer;
|
||||
|
||||
/** @category I/O */
|
||||
declare var console: Console;
|
||||
|
||||
/** @category Events */
|
||||
declare interface ErrorEventInit extends EventInit {
|
||||
interface ErrorEventInit extends EventInit {
|
||||
message?: string;
|
||||
filename?: string;
|
||||
lineno?: number;
|
||||
|
@ -471,7 +471,7 @@ declare interface ErrorEventInit extends EventInit {
|
|||
}
|
||||
|
||||
/** @category Events */
|
||||
declare interface ErrorEvent extends Event {
|
||||
interface ErrorEvent extends Event {
|
||||
readonly message: string;
|
||||
readonly filename: string;
|
||||
readonly lineno: number;
|
||||
|
@ -486,13 +486,13 @@ declare var ErrorEvent: {
|
|||
};
|
||||
|
||||
/** @category Events */
|
||||
declare interface PromiseRejectionEventInit extends EventInit {
|
||||
interface PromiseRejectionEventInit extends EventInit {
|
||||
promise: Promise<any>;
|
||||
reason?: any;
|
||||
}
|
||||
|
||||
/** @category Events */
|
||||
declare interface PromiseRejectionEvent extends Event {
|
||||
interface PromiseRejectionEvent extends Event {
|
||||
readonly promise: Promise<any>;
|
||||
readonly reason: any;
|
||||
}
|
||||
|
@ -507,24 +507,24 @@ declare var PromiseRejectionEvent: {
|
|||
};
|
||||
|
||||
/** @category Workers */
|
||||
declare interface AbstractWorkerEventMap {
|
||||
interface AbstractWorkerEventMap {
|
||||
"error": ErrorEvent;
|
||||
}
|
||||
|
||||
/** @category Workers */
|
||||
declare interface WorkerEventMap extends AbstractWorkerEventMap {
|
||||
interface WorkerEventMap extends AbstractWorkerEventMap {
|
||||
"message": MessageEvent;
|
||||
"messageerror": MessageEvent;
|
||||
}
|
||||
|
||||
/** @category Workers */
|
||||
declare interface WorkerOptions {
|
||||
interface WorkerOptions {
|
||||
type?: "classic" | "module";
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/** @category Workers */
|
||||
declare interface Worker extends EventTarget {
|
||||
interface Worker extends EventTarget {
|
||||
onerror: (this: Worker, e: ErrorEvent) => any | null;
|
||||
onmessage: (this: Worker, e: MessageEvent) => any | null;
|
||||
onmessageerror: (this: Worker, e: MessageEvent) => any | null;
|
||||
|
@ -560,10 +560,10 @@ declare var Worker: {
|
|||
};
|
||||
|
||||
/** @category Performance */
|
||||
declare type PerformanceEntryList = PerformanceEntry[];
|
||||
type PerformanceEntryList = PerformanceEntry[];
|
||||
|
||||
/** @category Performance */
|
||||
declare interface Performance extends EventTarget {
|
||||
interface Performance extends EventTarget {
|
||||
/** Returns a timestamp representing the start of the performance measurement. */
|
||||
readonly timeOrigin: number;
|
||||
|
||||
|
@ -617,7 +617,7 @@ declare var Performance: {
|
|||
declare var performance: Performance;
|
||||
|
||||
/** @category Performance */
|
||||
declare interface PerformanceMarkOptions {
|
||||
interface PerformanceMarkOptions {
|
||||
/** Metadata to be included in the mark. */
|
||||
detail?: any;
|
||||
|
||||
|
@ -626,7 +626,7 @@ declare interface PerformanceMarkOptions {
|
|||
}
|
||||
|
||||
/** @category Performance */
|
||||
declare interface PerformanceMeasureOptions {
|
||||
interface PerformanceMeasureOptions {
|
||||
/** Metadata to be included in the measure. */
|
||||
detail?: any;
|
||||
|
||||
|
@ -648,7 +648,7 @@ declare interface PerformanceMeasureOptions {
|
|||
*
|
||||
* @category Performance
|
||||
*/
|
||||
declare interface PerformanceEntry {
|
||||
interface PerformanceEntry {
|
||||
readonly duration: number;
|
||||
readonly entryType: string;
|
||||
readonly name: string;
|
||||
|
@ -675,7 +675,7 @@ declare var PerformanceEntry: {
|
|||
*
|
||||
* @category Performance
|
||||
*/
|
||||
declare interface PerformanceMark extends PerformanceEntry {
|
||||
interface PerformanceMark extends PerformanceEntry {
|
||||
readonly detail: any;
|
||||
readonly entryType: "mark";
|
||||
}
|
||||
|
@ -699,7 +699,7 @@ declare var PerformanceMark: {
|
|||
*
|
||||
* @category Performance
|
||||
*/
|
||||
declare interface PerformanceMeasure extends PerformanceEntry {
|
||||
interface PerformanceMeasure extends PerformanceEntry {
|
||||
readonly detail: any;
|
||||
readonly entryType: "measure";
|
||||
}
|
||||
|
@ -717,12 +717,12 @@ declare var PerformanceMeasure: {
|
|||
};
|
||||
|
||||
/** @category Events */
|
||||
declare interface CustomEventInit<T = any> extends EventInit {
|
||||
interface CustomEventInit<T = any> extends EventInit {
|
||||
detail?: T;
|
||||
}
|
||||
|
||||
/** @category Events */
|
||||
declare interface CustomEvent<T = any> extends Event {
|
||||
interface CustomEvent<T = any> extends Event {
|
||||
/** Returns any custom data event was created with. Typically used for
|
||||
* synthetic events. */
|
||||
readonly detail: T;
|
||||
|
@ -735,7 +735,7 @@ declare var CustomEvent: {
|
|||
};
|
||||
|
||||
/** @category Platform */
|
||||
declare interface ErrorConstructor {
|
||||
interface ErrorConstructor {
|
||||
/** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */
|
||||
captureStackTrace(error: Object, constructor?: Function): void;
|
||||
// TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this
|
||||
|
|
62
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
62
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -212,7 +212,7 @@ declare namespace Deno {
|
|||
* @category Cloud
|
||||
* @experimental
|
||||
*/
|
||||
export function openKv(path?: string): Promise<Deno.Kv>;
|
||||
export function openKv(path?: string): Promise<Kv>;
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
|
@ -475,7 +475,11 @@ declare namespace Deno {
|
|||
* @category Cloud
|
||||
* @experimental
|
||||
*/
|
||||
export type KvEntry<T> = { key: KvKey; value: T; versionstamp: string };
|
||||
export interface KvEntry<T> {
|
||||
key: KvKey;
|
||||
value: T;
|
||||
versionstamp: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* **UNSTABLE**: New API, yet to be vetted.
|
||||
|
@ -680,7 +684,7 @@ declare namespace Deno {
|
|||
value: unknown,
|
||||
options?: {
|
||||
delay?: number;
|
||||
keysIfUndelivered?: Deno.KvKey[];
|
||||
keysIfUndelivered?: KvKey[];
|
||||
backoffSchedule?: number[];
|
||||
},
|
||||
): this;
|
||||
|
@ -911,7 +915,7 @@ declare namespace Deno {
|
|||
value: unknown,
|
||||
options?: {
|
||||
delay?: number;
|
||||
keysIfUndelivered?: Deno.KvKey[];
|
||||
keysIfUndelivered?: KvKey[];
|
||||
backoffSchedule?: number[];
|
||||
},
|
||||
): Promise<KvCommitResult>;
|
||||
|
@ -1041,10 +1045,10 @@ declare namespace Deno {
|
|||
* @category Jupyter
|
||||
* @experimental
|
||||
*/
|
||||
export type VegaObject = {
|
||||
export interface VegaObject {
|
||||
$schema: string;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A collection of supported media types and data for Jupyter frontends.
|
||||
|
@ -1052,7 +1056,7 @@ declare namespace Deno {
|
|||
* @category Jupyter
|
||||
* @experimental
|
||||
*/
|
||||
export type MediaBundle = {
|
||||
export interface MediaBundle {
|
||||
"text/plain"?: string;
|
||||
"text/html"?: string;
|
||||
"image/svg+xml"?: string;
|
||||
|
@ -1078,7 +1082,7 @@ declare namespace Deno {
|
|||
|
||||
// Must support a catch all for custom media types / mimetypes
|
||||
[key: string]: string | object | undefined;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @category Jupyter
|
||||
|
@ -1090,9 +1094,9 @@ declare namespace Deno {
|
|||
* @category Jupyter
|
||||
* @experimental
|
||||
*/
|
||||
export type Displayable = {
|
||||
export interface Displayable {
|
||||
[$display]: () => MediaBundle | Promise<MediaBundle>;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Display function for Jupyter Deno Kernel.
|
||||
|
@ -1217,7 +1221,11 @@ declare namespace Deno {
|
|||
buffers?: Uint8Array[];
|
||||
},
|
||||
): Promise<void>;
|
||||
|
||||
export {}; // only export exports
|
||||
}
|
||||
|
||||
export {}; // only export exports
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
|
@ -1225,7 +1233,7 @@ declare namespace Deno {
|
|||
* @category Workers
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WorkerOptions {
|
||||
interface WorkerOptions {
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Configure permissions options to change the level of access the worker will
|
||||
|
@ -1266,7 +1274,7 @@ declare interface WorkerOptions {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketStreamOptions {
|
||||
interface WebSocketStreamOptions {
|
||||
protocols?: string[];
|
||||
signal?: AbortSignal;
|
||||
headers?: HeadersInit;
|
||||
|
@ -1277,7 +1285,7 @@ declare interface WebSocketStreamOptions {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketConnection {
|
||||
interface WebSocketConnection {
|
||||
readable: ReadableStream<string | Uint8Array>;
|
||||
writable: WritableStream<string | Uint8Array>;
|
||||
extensions: string;
|
||||
|
@ -1289,7 +1297,7 @@ declare interface WebSocketConnection {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketCloseInfo {
|
||||
interface WebSocketCloseInfo {
|
||||
code?: number;
|
||||
reason?: string;
|
||||
}
|
||||
|
@ -1300,7 +1308,7 @@ declare interface WebSocketCloseInfo {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketStream {
|
||||
interface WebSocketStream {
|
||||
url: string;
|
||||
opened: Promise<WebSocketConnection>;
|
||||
closed: Promise<WebSocketCloseInfo>;
|
||||
|
@ -1324,7 +1332,7 @@ declare var WebSocketStream: {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketError extends DOMException {
|
||||
interface WebSocketError extends DOMException {
|
||||
readonly closeCode: number;
|
||||
readonly reason: string;
|
||||
}
|
||||
|
@ -2884,7 +2892,7 @@ declare namespace Temporal {
|
|||
* @category Temporal
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Date {
|
||||
interface Date {
|
||||
toTemporalInstant(): Temporal.Instant;
|
||||
}
|
||||
|
||||
|
@ -2986,7 +2994,7 @@ declare namespace Intl {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
*/
|
||||
|
@ -3301,7 +3309,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16ArrayConstructor {
|
||||
interface Float16ArrayConstructor {
|
||||
readonly prototype: Float16Array;
|
||||
new (length: number): Float16Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Float16Array;
|
||||
|
@ -3350,7 +3358,7 @@ declare var Float16Array: Float16ArrayConstructor;
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the array
|
||||
|
@ -3370,7 +3378,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Constructor {
|
||||
interface Float16Constructor {
|
||||
new (elements: Iterable<number>): Float16Array;
|
||||
|
||||
/**
|
||||
|
@ -3390,7 +3398,7 @@ declare interface Float16Constructor {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
readonly [Symbol.toStringTag]: "Float16Array";
|
||||
}
|
||||
|
||||
|
@ -3398,7 +3406,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
||||
* @param searchElement The element to search for.
|
||||
|
@ -3411,7 +3419,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16ArrayConstructor {
|
||||
interface Float16ArrayConstructor {
|
||||
new (): Float16Array;
|
||||
}
|
||||
|
||||
|
@ -3419,7 +3427,7 @@ declare interface Float16ArrayConstructor {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* Returns the item located at the specified index.
|
||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
||||
|
@ -3431,7 +3439,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
|
@ -3507,7 +3515,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface DataView {
|
||||
interface DataView {
|
||||
/**
|
||||
* Gets the Float16 value at the specified byte offset from the start of the view. There is
|
||||
* no alignment constraint; multi-byte values may be fetched from any offset.
|
||||
|
|
8
cli/tsc/dts/lib.deno.window.d.ts
vendored
8
cli/tsc/dts/lib.deno.window.d.ts
vendored
|
@ -8,14 +8,14 @@
|
|||
/// <reference lib="deno.cache" />
|
||||
|
||||
/** @category Platform */
|
||||
declare interface WindowEventMap {
|
||||
interface WindowEventMap {
|
||||
"error": ErrorEvent;
|
||||
"unhandledrejection": PromiseRejectionEvent;
|
||||
"rejectionhandled": PromiseRejectionEvent;
|
||||
}
|
||||
|
||||
/** @category Platform */
|
||||
declare interface Window extends EventTarget {
|
||||
interface Window extends EventTarget {
|
||||
readonly window: Window & typeof globalThis;
|
||||
readonly self: Window & typeof globalThis;
|
||||
onerror: ((this: Window, ev: ErrorEvent) => any) | null;
|
||||
|
@ -105,7 +105,7 @@ declare var sessionStorage: Storage;
|
|||
declare var caches: CacheStorage;
|
||||
|
||||
/** @category Platform */
|
||||
declare interface Navigator {
|
||||
interface Navigator {
|
||||
readonly gpu: GPU;
|
||||
readonly hardwareConcurrency: number;
|
||||
readonly userAgent: string;
|
||||
|
@ -221,7 +221,7 @@ declare function removeEventListener(
|
|||
*
|
||||
* @category Platform
|
||||
*/
|
||||
declare interface Location {
|
||||
interface Location {
|
||||
/** Returns a DOMStringList object listing the origins of the ancestor
|
||||
* browsing contexts, from the parent browsing context to the top-level
|
||||
* browsing context.
|
||||
|
|
212
cli/tsc/dts/lib.deno_webgpu.d.ts
vendored
212
cli/tsc/dts/lib.deno_webgpu.d.ts
vendored
|
@ -6,12 +6,12 @@
|
|||
/// <reference lib="esnext" />
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUObjectBase {
|
||||
interface GPUObjectBase {
|
||||
label: string;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUObjectDescriptorBase {
|
||||
interface GPUObjectDescriptorBase {
|
||||
label?: string;
|
||||
}
|
||||
|
||||
|
@ -84,13 +84,13 @@ declare class GPU {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURequestAdapterOptions {
|
||||
interface GPURequestAdapterOptions {
|
||||
powerPreference?: GPUPowerPreference;
|
||||
forceFallbackAdapter?: boolean;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUPowerPreference = "low-power" | "high-performance";
|
||||
type GPUPowerPreference = "low-power" | "high-performance";
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUAdapter {
|
||||
|
@ -103,13 +103,13 @@ declare class GPUAdapter {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUDeviceDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUDeviceDescriptor extends GPUObjectDescriptorBase {
|
||||
requiredFeatures?: GPUFeatureName[];
|
||||
requiredLimits?: Record<string, number>;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUFeatureName =
|
||||
type GPUFeatureName =
|
||||
| "depth-clip-control"
|
||||
| "depth32float-stencil8"
|
||||
| "pipeline-statistics-query"
|
||||
|
@ -206,20 +206,20 @@ declare class GPUBuffer implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUBufferMapState = "unmapped" | "pending" | "mapped";
|
||||
type GPUBufferMapState = "unmapped" | "pending" | "mapped";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
|
||||
size: number;
|
||||
usage: GPUBufferUsageFlags;
|
||||
mappedAtCreation?: boolean;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUBufferUsageFlags = number;
|
||||
type GPUBufferUsageFlags = number;
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUFlagsConstant = number;
|
||||
type GPUFlagsConstant = number;
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUBufferUsage {
|
||||
|
@ -236,7 +236,7 @@ declare class GPUBufferUsage {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUMapModeFlags = number;
|
||||
type GPUMapModeFlags = number;
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUMapMode {
|
||||
|
@ -262,7 +262,7 @@ declare class GPUTexture implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
||||
size: GPUExtent3D;
|
||||
mipLevelCount?: number;
|
||||
sampleCount?: number;
|
||||
|
@ -273,10 +273,10 @@ declare interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUTextureDimension = "1d" | "2d" | "3d";
|
||||
type GPUTextureDimension = "1d" | "2d" | "3d";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUTextureUsageFlags = number;
|
||||
type GPUTextureUsageFlags = number;
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUTextureUsage {
|
||||
|
@ -293,7 +293,7 @@ declare class GPUTextureView implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
||||
format?: GPUTextureFormat;
|
||||
dimension?: GPUTextureViewDimension;
|
||||
aspect?: GPUTextureAspect;
|
||||
|
@ -304,7 +304,7 @@ declare interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUTextureViewDimension =
|
||||
type GPUTextureViewDimension =
|
||||
| "1d"
|
||||
| "2d"
|
||||
| "2d-array"
|
||||
|
@ -313,10 +313,10 @@ declare type GPUTextureViewDimension =
|
|||
| "3d";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUTextureAspect = "all" | "stencil-only" | "depth-only";
|
||||
type GPUTextureAspect = "all" | "stencil-only" | "depth-only";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUTextureFormat =
|
||||
type GPUTextureFormat =
|
||||
| "r8unorm"
|
||||
| "r8snorm"
|
||||
| "r8uint"
|
||||
|
@ -419,7 +419,7 @@ declare class GPUSampler implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
||||
addressModeU?: GPUAddressMode;
|
||||
addressModeV?: GPUAddressMode;
|
||||
addressModeW?: GPUAddressMode;
|
||||
|
@ -433,16 +433,16 @@ declare interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUAddressMode = "clamp-to-edge" | "repeat" | "mirror-repeat";
|
||||
type GPUAddressMode = "clamp-to-edge" | "repeat" | "mirror-repeat";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUFilterMode = "nearest" | "linear";
|
||||
type GPUFilterMode = "nearest" | "linear";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUMipmapFilterMode = "nearest" | "linear";
|
||||
type GPUMipmapFilterMode = "nearest" | "linear";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUCompareFunction =
|
||||
type GPUCompareFunction =
|
||||
| "never"
|
||||
| "less"
|
||||
| "equal"
|
||||
|
@ -458,12 +458,12 @@ declare class GPUBindGroupLayout implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase {
|
||||
entries: GPUBindGroupLayoutEntry[];
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBindGroupLayoutEntry {
|
||||
interface GPUBindGroupLayoutEntry {
|
||||
binding: number;
|
||||
visibility: GPUShaderStageFlags;
|
||||
|
||||
|
@ -474,7 +474,7 @@ declare interface GPUBindGroupLayoutEntry {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUShaderStageFlags = number;
|
||||
type GPUShaderStageFlags = number;
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUShaderStage {
|
||||
|
@ -484,35 +484,35 @@ declare class GPUShaderStage {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBufferBindingLayout {
|
||||
interface GPUBufferBindingLayout {
|
||||
type?: GPUBufferBindingType;
|
||||
hasDynamicOffset?: boolean;
|
||||
minBindingSize?: number;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUBufferBindingType = "uniform" | "storage" | "read-only-storage";
|
||||
type GPUBufferBindingType = "uniform" | "storage" | "read-only-storage";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUSamplerBindingLayout {
|
||||
interface GPUSamplerBindingLayout {
|
||||
type?: GPUSamplerBindingType;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUSamplerBindingType =
|
||||
type GPUSamplerBindingType =
|
||||
| "filtering"
|
||||
| "non-filtering"
|
||||
| "comparison";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUTextureBindingLayout {
|
||||
interface GPUTextureBindingLayout {
|
||||
sampleType?: GPUTextureSampleType;
|
||||
viewDimension?: GPUTextureViewDimension;
|
||||
multisampled?: boolean;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUTextureSampleType =
|
||||
type GPUTextureSampleType =
|
||||
| "float"
|
||||
| "unfilterable-float"
|
||||
| "depth"
|
||||
|
@ -520,13 +520,13 @@ declare type GPUTextureSampleType =
|
|||
| "uint";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUStorageTextureAccess =
|
||||
type GPUStorageTextureAccess =
|
||||
| "write-only"
|
||||
| "read-only"
|
||||
| "read-write";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUStorageTextureBindingLayout {
|
||||
interface GPUStorageTextureBindingLayout {
|
||||
access: GPUStorageTextureAccess;
|
||||
format: GPUTextureFormat;
|
||||
viewDimension?: GPUTextureViewDimension;
|
||||
|
@ -538,25 +538,25 @@ declare class GPUBindGroup implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
|
||||
layout: GPUBindGroupLayout;
|
||||
entries: GPUBindGroupEntry[];
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUBindingResource =
|
||||
type GPUBindingResource =
|
||||
| GPUSampler
|
||||
| GPUTextureView
|
||||
| GPUBufferBinding;
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBindGroupEntry {
|
||||
interface GPUBindGroupEntry {
|
||||
binding: number;
|
||||
resource: GPUBindingResource;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBufferBinding {
|
||||
interface GPUBufferBinding {
|
||||
buffer: GPUBuffer;
|
||||
offset?: number;
|
||||
size?: number;
|
||||
|
@ -568,15 +568,15 @@ declare class GPUPipelineLayout implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
||||
bindGroupLayouts: GPUBindGroupLayout[];
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUCompilationMessageType = "error" | "warning" | "info";
|
||||
type GPUCompilationMessageType = "error" | "warning" | "info";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUCompilationMessage {
|
||||
interface GPUCompilationMessage {
|
||||
readonly message: string;
|
||||
readonly type: GPUCompilationMessageType;
|
||||
readonly lineNum: number;
|
||||
|
@ -584,7 +584,7 @@ declare interface GPUCompilationMessage {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUCompilationInfo {
|
||||
interface GPUCompilationInfo {
|
||||
readonly messages: ReadonlyArray<GPUCompilationMessage>;
|
||||
}
|
||||
|
||||
|
@ -596,12 +596,12 @@ declare class GPUPipelineError extends DOMException {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUPipelineErrorInit {
|
||||
interface GPUPipelineErrorInit {
|
||||
reason: GPUPipelineErrorReason;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUPipelineErrorReason = "validation" | "internal";
|
||||
type GPUPipelineErrorReason = "validation" | "internal";
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUShaderModule implements GPUObjectBase {
|
||||
|
@ -609,26 +609,26 @@ declare class GPUShaderModule implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
||||
code: string;
|
||||
sourceMap?: any;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUAutoLayoutMode = "auto";
|
||||
type GPUAutoLayoutMode = "auto";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
|
||||
interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
|
||||
layout: GPUPipelineLayout | GPUAutoLayoutMode;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUPipelineBase {
|
||||
interface GPUPipelineBase {
|
||||
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUProgrammableStage {
|
||||
interface GPUProgrammableStage {
|
||||
module: GPUShaderModule;
|
||||
entryPoint?: string;
|
||||
constants?: Record<string, number>;
|
||||
|
@ -642,8 +642,7 @@ declare class GPUComputePipeline implements GPUObjectBase, GPUPipelineBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUComputePipelineDescriptor
|
||||
extends GPUPipelineDescriptorBase {
|
||||
interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
|
||||
compute: GPUProgrammableStage;
|
||||
}
|
||||
|
||||
|
@ -655,8 +654,7 @@ declare class GPURenderPipeline implements GPUObjectBase, GPUPipelineBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderPipelineDescriptor
|
||||
extends GPUPipelineDescriptorBase {
|
||||
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
||||
vertex: GPUVertexState;
|
||||
primitive?: GPUPrimitiveState;
|
||||
depthStencil?: GPUDepthStencilState;
|
||||
|
@ -665,7 +663,7 @@ declare interface GPURenderPipelineDescriptor
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUPrimitiveState {
|
||||
interface GPUPrimitiveState {
|
||||
topology?: GPUPrimitiveTopology;
|
||||
stripIndexFormat?: GPUIndexFormat;
|
||||
frontFace?: GPUFrontFace;
|
||||
|
@ -674,7 +672,7 @@ declare interface GPUPrimitiveState {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUPrimitiveTopology =
|
||||
type GPUPrimitiveTopology =
|
||||
| "point-list"
|
||||
| "line-list"
|
||||
| "line-strip"
|
||||
|
@ -682,25 +680,25 @@ declare type GPUPrimitiveTopology =
|
|||
| "triangle-strip";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUFrontFace = "ccw" | "cw";
|
||||
type GPUFrontFace = "ccw" | "cw";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUCullMode = "none" | "front" | "back";
|
||||
type GPUCullMode = "none" | "front" | "back";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUMultisampleState {
|
||||
interface GPUMultisampleState {
|
||||
count?: number;
|
||||
mask?: number;
|
||||
alphaToCoverageEnabled?: boolean;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUFragmentState extends GPUProgrammableStage {
|
||||
interface GPUFragmentState extends GPUProgrammableStage {
|
||||
targets: (GPUColorTargetState | null)[];
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUColorTargetState {
|
||||
interface GPUColorTargetState {
|
||||
format: GPUTextureFormat;
|
||||
|
||||
blend?: GPUBlendState;
|
||||
|
@ -708,13 +706,13 @@ declare interface GPUColorTargetState {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBlendState {
|
||||
interface GPUBlendState {
|
||||
color: GPUBlendComponent;
|
||||
alpha: GPUBlendComponent;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUColorWriteFlags = number;
|
||||
type GPUColorWriteFlags = number;
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUColorWrite {
|
||||
|
@ -726,14 +724,14 @@ declare class GPUColorWrite {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUBlendComponent {
|
||||
interface GPUBlendComponent {
|
||||
operation?: GPUBlendOperation;
|
||||
srcFactor?: GPUBlendFactor;
|
||||
dstFactor?: GPUBlendFactor;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUBlendFactor =
|
||||
type GPUBlendFactor =
|
||||
| "zero"
|
||||
| "one"
|
||||
| "src"
|
||||
|
@ -749,7 +747,7 @@ declare type GPUBlendFactor =
|
|||
| "one-minus-constant";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUBlendOperation =
|
||||
type GPUBlendOperation =
|
||||
| "add"
|
||||
| "subtract"
|
||||
| "reverse-subtract"
|
||||
|
@ -757,7 +755,7 @@ declare type GPUBlendOperation =
|
|||
| "max";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUDepthStencilState {
|
||||
interface GPUDepthStencilState {
|
||||
format: GPUTextureFormat;
|
||||
|
||||
depthWriteEnabled: boolean;
|
||||
|
@ -775,7 +773,7 @@ declare interface GPUDepthStencilState {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUStencilFaceState {
|
||||
interface GPUStencilFaceState {
|
||||
compare?: GPUCompareFunction;
|
||||
failOp?: GPUStencilOperation;
|
||||
depthFailOp?: GPUStencilOperation;
|
||||
|
@ -783,7 +781,7 @@ declare interface GPUStencilFaceState {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUStencilOperation =
|
||||
type GPUStencilOperation =
|
||||
| "keep"
|
||||
| "zero"
|
||||
| "replace"
|
||||
|
@ -794,10 +792,10 @@ declare type GPUStencilOperation =
|
|||
| "decrement-wrap";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUIndexFormat = "uint16" | "uint32";
|
||||
type GPUIndexFormat = "uint16" | "uint32";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUVertexFormat =
|
||||
type GPUVertexFormat =
|
||||
| "uint8x2"
|
||||
| "uint8x4"
|
||||
| "sint8x2"
|
||||
|
@ -831,22 +829,22 @@ declare type GPUVertexFormat =
|
|||
| "unorm10-10-10-2";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUVertexStepMode = "vertex" | "instance";
|
||||
type GPUVertexStepMode = "vertex" | "instance";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUVertexState extends GPUProgrammableStage {
|
||||
interface GPUVertexState extends GPUProgrammableStage {
|
||||
buffers?: (GPUVertexBufferLayout | null)[];
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUVertexBufferLayout {
|
||||
interface GPUVertexBufferLayout {
|
||||
arrayStride: number;
|
||||
stepMode?: GPUVertexStepMode;
|
||||
attributes: GPUVertexAttribute[];
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUVertexAttribute {
|
||||
interface GPUVertexAttribute {
|
||||
format: GPUVertexFormat;
|
||||
offset: number;
|
||||
|
||||
|
@ -854,7 +852,7 @@ declare interface GPUVertexAttribute {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUImageDataLayout {
|
||||
interface GPUImageDataLayout {
|
||||
offset?: number;
|
||||
bytesPerRow?: number;
|
||||
rowsPerImage?: number;
|
||||
|
@ -866,7 +864,7 @@ declare class GPUCommandBuffer implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {}
|
||||
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {}
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUCommandEncoder implements GPUObjectBase {
|
||||
|
@ -927,15 +925,15 @@ declare class GPUCommandEncoder implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {}
|
||||
interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUImageCopyBuffer extends GPUImageDataLayout {
|
||||
interface GPUImageCopyBuffer extends GPUImageDataLayout {
|
||||
buffer: GPUBuffer;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUImageCopyTexture {
|
||||
interface GPUImageCopyTexture {
|
||||
texture: GPUTexture;
|
||||
mipLevel?: number;
|
||||
origin?: GPUOrigin3D;
|
||||
|
@ -943,7 +941,7 @@ declare interface GPUImageCopyTexture {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUProgrammablePassEncoder {
|
||||
interface GPUProgrammablePassEncoder {
|
||||
setBindGroup(
|
||||
index: number,
|
||||
bindGroup: GPUBindGroup,
|
||||
|
@ -993,19 +991,19 @@ declare class GPUComputePassEncoder
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUComputePassTimestampWrites {
|
||||
interface GPUComputePassTimestampWrites {
|
||||
querySet: GPUQuerySet;
|
||||
beginningOfPassWriteIndex?: number;
|
||||
endOfPassWriteIndex?: number;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
||||
timestampWrites?: GPUComputePassTimestampWrites;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderEncoderBase {
|
||||
interface GPURenderEncoderBase {
|
||||
setPipeline(pipeline: GPURenderPipeline): undefined;
|
||||
|
||||
setIndexBuffer(
|
||||
|
@ -1120,14 +1118,14 @@ declare class GPURenderPassEncoder
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderPassTimestampWrites {
|
||||
interface GPURenderPassTimestampWrites {
|
||||
querySet: GPUQuerySet;
|
||||
beginningOfPassWriteIndex?: number;
|
||||
endOfPassWriteIndex?: number;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
||||
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
||||
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
||||
occlusionQuerySet?: GPUQuerySet;
|
||||
|
@ -1135,7 +1133,7 @@ declare interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderPassColorAttachment {
|
||||
interface GPURenderPassColorAttachment {
|
||||
view: GPUTextureView;
|
||||
resolveTarget?: GPUTextureView;
|
||||
|
||||
|
@ -1145,7 +1143,7 @@ declare interface GPURenderPassColorAttachment {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderPassDepthStencilAttachment {
|
||||
interface GPURenderPassDepthStencilAttachment {
|
||||
view: GPUTextureView;
|
||||
|
||||
depthClearValue?: number;
|
||||
|
@ -1160,10 +1158,10 @@ declare interface GPURenderPassDepthStencilAttachment {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPULoadOp = "load" | "clear";
|
||||
type GPULoadOp = "load" | "clear";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUStoreOp = "store" | "discard";
|
||||
type GPUStoreOp = "store" | "discard";
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPURenderBundle implements GPUObjectBase {
|
||||
|
@ -1171,7 +1169,7 @@ declare class GPURenderBundle implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {}
|
||||
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {}
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPURenderBundleEncoder
|
||||
|
@ -1228,14 +1226,14 @@ declare class GPURenderBundleEncoder
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderPassLayout extends GPUObjectDescriptorBase {
|
||||
interface GPURenderPassLayout extends GPUObjectDescriptorBase {
|
||||
colorFormats: (GPUTextureFormat | null)[];
|
||||
depthStencilFormat?: GPUTextureFormat;
|
||||
sampleCount?: number;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
|
||||
interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
|
||||
depthReadOnly?: boolean;
|
||||
stencilReadOnly?: boolean;
|
||||
}
|
||||
|
@ -1275,19 +1273,19 @@ declare class GPUQuerySet implements GPUObjectBase {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
|
||||
interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
|
||||
type: GPUQueryType;
|
||||
count: number;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUQueryType = "occlusion" | "timestamp";
|
||||
type GPUQueryType = "occlusion" | "timestamp";
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUDeviceLostReason = "destroyed";
|
||||
type GPUDeviceLostReason = "destroyed";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUDeviceLostInfo {
|
||||
interface GPUDeviceLostInfo {
|
||||
readonly reason: GPUDeviceLostReason;
|
||||
readonly message: string;
|
||||
}
|
||||
|
@ -1313,7 +1311,7 @@ declare class GPUInternalError extends GPUError {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUErrorFilter = "out-of-memory" | "validation" | "internal";
|
||||
type GPUErrorFilter = "out-of-memory" | "validation" | "internal";
|
||||
|
||||
/** @category GPU */
|
||||
declare class GPUUncapturedErrorEvent extends Event {
|
||||
|
@ -1326,12 +1324,12 @@ declare class GPUUncapturedErrorEvent extends Event {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUUncapturedErrorEventInit extends EventInit {
|
||||
interface GPUUncapturedErrorEventInit extends EventInit {
|
||||
error: GPUError;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUColorDict {
|
||||
interface GPUColorDict {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
|
@ -1339,33 +1337,33 @@ declare interface GPUColorDict {
|
|||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUColor = number[] | GPUColorDict;
|
||||
type GPUColor = number[] | GPUColorDict;
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUOrigin3DDict {
|
||||
interface GPUOrigin3DDict {
|
||||
x?: number;
|
||||
y?: number;
|
||||
z?: number;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUOrigin3D = number[] | GPUOrigin3DDict;
|
||||
type GPUOrigin3D = number[] | GPUOrigin3DDict;
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUExtent3DDict {
|
||||
interface GPUExtent3DDict {
|
||||
width: number;
|
||||
height?: number;
|
||||
depthOrArrayLayers?: number;
|
||||
}
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUExtent3D = number[] | GPUExtent3DDict;
|
||||
type GPUExtent3D = number[] | GPUExtent3DDict;
|
||||
|
||||
/** @category GPU */
|
||||
declare type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
||||
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
||||
|
||||
/** @category GPU */
|
||||
declare interface GPUCanvasConfiguration {
|
||||
interface GPUCanvasConfiguration {
|
||||
device: GPUDevice;
|
||||
format: GPUTextureFormat;
|
||||
usage?: GPUTextureUsageFlags;
|
||||
|
@ -1374,7 +1372,7 @@ declare interface GPUCanvasConfiguration {
|
|||
alphaMode?: GPUCanvasAlphaMode;
|
||||
}
|
||||
/** @category GPU */
|
||||
declare interface GPUCanvasContext {
|
||||
interface GPUCanvasContext {
|
||||
configure(configuration: GPUCanvasConfiguration): undefined;
|
||||
unconfigure(): undefined;
|
||||
getCurrentTexture(): GPUTexture;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue