export { matchDeclarations, replaceDeclaration, constructValue, constructType, UserTypes }; import { Vec, Mat } from './utils.js'; import type { Tuple } from '../lib/list.js'; type ConstTypes = keyof TypesMap; type UserTypes = TypesMap[ConstTypes]; type Bool = boolean; type Int = number; type Float = number; type Mat = Vec>; type Vec = Tuple; type TypesMap = { bool: Bool; int: Int; float: Float; bvec2: Vec<2, Bool>; bvec3: Vec<3, Bool>; bvec4: Vec<4, Bool>; ivec2: Vec<2, Int>; ivec3: Vec<3, Int>; ivec4: Vec<4, Int>; vec2: Vec<2, Float>; vec3: Vec<3, Float>; vec4: Vec<4, Float>; mat2: Mat<2>; mat3: Mat<3>; mat4: Mat<4>; }; declare const constructType: (type: ConstTypes) => string; declare const constructValue: (value: TypesMap[K], type: K) => string; type DeclarationMatches = [type: ConstTypes, name: string]; declare const matchDeclarations: (code: string) => DeclarationMatches[]; declare const replaceDeclaration: (code: string, replaceCallback: (...args: [original: string, leftpad: string, ...DeclarationMatches]) => string) => string;