Skip to content

MemIdentity

MemIdentity<T> = T extends object ? TMemIdent : T

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

Expands a schema to a union of other schemas that have the same binary representation.

T

type A = MemIdentity<F32> // => F32
type B = MemIdentity<I32> // => I32 | Atomic<I32> | Decorated<I32, Location[]>
type C = MemIdentity<WgslArray<I32>> // => WgslArray<I32 | Atomic<I32> | Decorated<I32, Location[]>>