InferInput
InferInput<
T> =Infer<T> |Textendsobject?TRepr:never
Defined in: packages/typegpu/src/shared/repr.ts:42
Extracts the inferred input (write-side) representation of a resource.
Type Parameters
Section titled “Type Parameters”T
Example
Section titled “Example”type A = InferInput<Vec3f> // => v3f | [number, number, number] | Float32Arraytype B = InferInput<WgslArray<Vec3f>> // => (v3f | [number, number, number] | Float32Array)[] | Float32Arraytype C = InferInput<F32> // => number (same as Infer<F32>)const arrayOfStructs = d.arrayOf(d.struct({ pos: d.vec3f, id: d.f32 }), 4);type D = d.InferInput<typeof arrayOfStructs>; // { pos: d.v3f | Float32Array<ArrayBufferLike> | [number, number, number]; id: number; }[]