/ concept-collection / turing-surface-cache
Sign in
concept-collection / turing-surface-cache
turing-surface-cache / src / raw.d.ts
23 lines · 838 BBlameHistoryRaw
1/**
2 * True in the command line's bundle, false in the page's. Defined by both
3 * vite configs, so it is a constant the bundler folds away rather than a
4 * runtime test — the browser build must not carry node's h5wasm, nor the
5 * command line the browser's (src/cache/h5file.ts).
6 */
7declare const __NODE_BUILD__: boolean;
9/** Vite's `?raw` suffix imports a file's text. Used to load .m model sources. */
10declare module '*?raw' {
11 const source: string;
12 export default source;
15/** Vite's `import.meta.glob`, used to load every .m in tools/ at once
16 * (src/tools.ts). Only the eager + `?raw` form this project uses is
17 * declared — it returns each match's text, keyed by path. */
18interface ImportMeta {
19 glob(
20 pattern: string,
21 options: { query: '?raw'; eager: true; import: 'default' },
22 ): Record<string, string>;
moveopenescclose