Skip to content

InferPartial

InferPartial<T>: T extends object ? TRepr : T extends object ? TRepr | undefined : T

Defined in: packages/typegpu/src/shared/repr.ts:35

Extracts a sparse/partial inferred representation of a resource. Used by the buffer.writePartial API.

T

type A = InferPartial<F32> // => number | undefined
type B = InferPartial<WgslStruct<{ a: F32 }>> // => { a?: number | undefined }
type C = InferPartial<WgslArray<F32>> // => { idx: number; value: number | undefined }[] | undefined