/** * Identity functions with types attached. * * They exist for two reasons that a plain object literal does not give you: * inference (a demo writes `defineDemo({...})` once and every * callback inside is typed), and a stable grep target — `defineDemo(` finds * every demo in the repo, which is what `scripts/check-demos.mjs` and any * future codemod key off. Do not "simplify" these away. */ import type { DemoMeta, DemoModule } from './types'; /** Wrap the object exported from a demo's `meta.ts`. */ export function defineMeta(meta: DemoMeta): DemoMeta { return meta; } /** Wrap the object exported from a demo's `demo.tsx`. */ export function defineDemo(demo: DemoModule): DemoModule { return demo; }