schemasEqualStructurally
constschemasEqualStructurally:TgpuComptime<(a,b) =>boolean>
Defined in: packages/typegpu/src/data/schemasEqual.ts:23
Performs a structural comparison of two TypeGPU data schemas. This
means two struct definitions are considered equal when they have the
same properties. Use schemasEqualNominally for a nominal comparison.
The first data schema to compare.
The second data schema to compare.
Returns
Section titled “Returns”true if the schemas are structurally equal, false otherwise.
Example
Section titled “Example”import { vec3f, struct, schemasEqualStructurally } from 'typegpu/data';
console.log(schemasEqualStructurally(struct({ a: vec3f }), struct({ a: vec3f }))); // trueconsole.log(schemasEqualStructurally(struct({ a: vec3f }), struct({ b: vec3f }))); // false© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.