Skip to content

Commit

Permalink
Add missing constructors, remove non-existent interfaces/prototypes/c…
Browse files Browse the repository at this point in the history
…onstructors (#149)

* Add missing constructor to GPUAdapterInfo

* Remove non-existent prototypes/constructors from namespaces

* Remove interface definitions for namespaces
  • Loading branch information
kainino0x authored May 30, 2024
1 parent 8079eda commit 7556dfe
Showing 1 changed file with 1 addition and 76 deletions.
77 changes: 1 addition & 76 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1970,6 +1970,7 @@ interface GPUAdapterInfo {

declare var GPUAdapterInfo: {
prototype: GPUAdapterInfo;
new (): never;
};

interface GPUBindGroup
Expand Down Expand Up @@ -3166,27 +3167,7 @@ interface Navigator
interface WorkerNavigator
extends NavigatorGPU {}

interface GPUBufferUsage {
/**
* Nominal type branding.
* https://github.com/microsoft/TypeScript/pull/33038
* @internal
*/
readonly __brand: "GPUBufferUsage";
readonly MAP_READ: GPUFlagsConstant;
readonly MAP_WRITE: GPUFlagsConstant;
readonly COPY_SRC: GPUFlagsConstant;
readonly COPY_DST: GPUFlagsConstant;
readonly INDEX: GPUFlagsConstant;
readonly VERTEX: GPUFlagsConstant;
readonly UNIFORM: GPUFlagsConstant;
readonly STORAGE: GPUFlagsConstant;
readonly INDIRECT: GPUFlagsConstant;
readonly QUERY_RESOLVE: GPUFlagsConstant;
}

declare var GPUBufferUsage: {
prototype: GPUBufferUsage;
readonly MAP_READ: GPUFlagsConstant;
readonly MAP_WRITE: GPUFlagsConstant;
readonly COPY_SRC: GPUFlagsConstant;
Expand All @@ -3199,82 +3180,26 @@ declare var GPUBufferUsage: {
readonly QUERY_RESOLVE: GPUFlagsConstant;
};

interface GPUColorWrite {
/**
* Nominal type branding.
* https://github.com/microsoft/TypeScript/pull/33038
* @internal
*/
readonly __brand: "GPUColorWrite";
readonly RED: GPUFlagsConstant;
readonly GREEN: GPUFlagsConstant;
readonly BLUE: GPUFlagsConstant;
readonly ALPHA: GPUFlagsConstant;
readonly ALL: GPUFlagsConstant;
}

declare var GPUColorWrite: {
prototype: GPUColorWrite;
readonly RED: GPUFlagsConstant;
readonly GREEN: GPUFlagsConstant;
readonly BLUE: GPUFlagsConstant;
readonly ALPHA: GPUFlagsConstant;
readonly ALL: GPUFlagsConstant;
};

interface GPUMapMode {
/**
* Nominal type branding.
* https://github.com/microsoft/TypeScript/pull/33038
* @internal
*/
readonly __brand: "GPUMapMode";
readonly READ: GPUFlagsConstant;
readonly WRITE: GPUFlagsConstant;
}

declare var GPUMapMode: {
prototype: GPUMapMode;
new (): never;
readonly READ: GPUFlagsConstant;
readonly WRITE: GPUFlagsConstant;
};

interface GPUShaderStage {
/**
* Nominal type branding.
* https://github.com/microsoft/TypeScript/pull/33038
* @internal
*/
readonly __brand: "GPUShaderStage";
readonly VERTEX: GPUFlagsConstant;
readonly FRAGMENT: GPUFlagsConstant;
readonly COMPUTE: GPUFlagsConstant;
}

declare var GPUShaderStage: {
prototype: GPUShaderStage;
readonly VERTEX: GPUFlagsConstant;
readonly FRAGMENT: GPUFlagsConstant;
readonly COMPUTE: GPUFlagsConstant;
};

interface GPUTextureUsage {
/**
* Nominal type branding.
* https://github.com/microsoft/TypeScript/pull/33038
* @internal
*/
readonly __brand: "GPUTextureUsage";
readonly COPY_SRC: GPUFlagsConstant;
readonly COPY_DST: GPUFlagsConstant;
readonly TEXTURE_BINDING: GPUFlagsConstant;
readonly STORAGE_BINDING: GPUFlagsConstant;
readonly RENDER_ATTACHMENT: GPUFlagsConstant;
}

declare var GPUTextureUsage: {
prototype: GPUTextureUsage;
readonly COPY_SRC: GPUFlagsConstant;
readonly COPY_DST: GPUFlagsConstant;
readonly TEXTURE_BINDING: GPUFlagsConstant;
Expand Down

0 comments on commit 7556dfe

Please sign in to comment.