mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 21:24:48 +00:00
fix(webgpu): add webidl records and simple unions (#9698)
The only functional user facing difference is that this commit allows the use SPIRV shaders, not just WGSL. This matches FF and Chrome Canary.
This commit is contained in:
parent
0bc488c85c
commit
c009dad982
3 changed files with 249 additions and 110 deletions
18
op_crates/web/internal.d.ts
vendored
18
op_crates/web/internal.d.ts
vendored
|
@ -25,6 +25,11 @@ declare namespace globalThis {
|
|||
*/
|
||||
context: string;
|
||||
}
|
||||
declare function makeException(
|
||||
ErrorType: any,
|
||||
message: string,
|
||||
opts: ValueConverterOpts,
|
||||
): any;
|
||||
declare interface IntConverterOpts extends ValueConverterOpts {
|
||||
/**
|
||||
* Wether to throw if the number is outside of the acceptable values for
|
||||
|
@ -191,6 +196,8 @@ declare namespace globalThis {
|
|||
* Convert a value into a `VoidFunction` (() => void).
|
||||
*/
|
||||
VoidFunction(v: any, opts?: ValueConverterOpts): () => void;
|
||||
["UVString?"](v: any, opts?: ValueConverterOpts): string | null;
|
||||
["sequence<double>"](v: any, opts?: ValueConverterOpts): number[];
|
||||
|
||||
[type: string]: (v: any, opts: ValueConverterOpts) => any;
|
||||
};
|
||||
|
@ -268,6 +275,17 @@ declare namespace globalThis {
|
|||
name: string,
|
||||
prototype: any,
|
||||
): (v: any, opts: ValueConverterOpts) => any;
|
||||
|
||||
declare function createRecordConverter<
|
||||
K extends string | number | symbol,
|
||||
V,
|
||||
>(
|
||||
keyConverter: (v: any, opts: ValueConverterOpts) => K,
|
||||
valueConverter: (v: any, opts: ValueConverterOpts) => V,
|
||||
): (
|
||||
v: Record<K, V>,
|
||||
opts: ValueConverterOpts,
|
||||
) => any;
|
||||
}
|
||||
|
||||
declare var eventTarget: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue