typegpu
Version:
A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.
22 lines (21 loc) • 676 B
TypeScript
import type { AnyData } from './dataTypes.ts';
/**
* Performs a deep comparison of two TypeGPU data schemas.
*
* @param a The first data schema to compare.
* @param b The second data schema to compare.
* @returns `true` if the schemas are deeply equal, `false` otherwise.
*
* @example
* ```ts
* import { vec3f, struct, deepEqual } from 'typegpu/data';
*
* const schema1 = struct({ a: vec3f });
* const schema2 = struct({ a: vec3f });
* const schema3 = struct({ b: vec3f });
*
* console.log(deepEqual(schema1, schema2)); // true
* console.log(deepEqual(schema1, schema3)); // false
* ```
*/
export declare function deepEqual(a: AnyData, b: AnyData): boolean;