Skip to content

InferPatch

InferPatch<T> = T extends object ? TRepr : InferInput<T> | undefined

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

Extracts the patch representation of a resource. Used by the buffer.patch API.

T

type A = InferPatch<F32> // => number | undefined
type B = InferPatch<WgslStruct<{ a: F32 }>> // => { a?: number | undefined }
type C = InferPatch<WgslArray<F32>> // => Record<number, number | undefined> | number[] | undefined