solar-spa/.github/wiki/api/functions/init.md
Aric Camarata 3c848806ab docs: add TypeDoc API generation (typedoc@0.28.19 + typedoc-plugin-markdown@4.11.0)
Add typedoc and typedoc-plugin-markdown as devDependencies. Add typedoc.json config
targeting src/index.ts with markdown output to .github/wiki/api. Add docs script to
package.json. Generate initial API reference pages.

Part of T-E8-03 — TypeDoc automation for all 12 JS/TS packages.
2026-05-30 16:41:57 -04:00

873 B

solar-spa v2.0.1


solar-spa / init

Function: init()

init(): Promise<void>

Defined in: index.ts:60

Purpose: Pre-initialize the WASM module before the first spa() call. Inputs: none Outputs: Promise; resolves when the module is ready Constraints: Safe to call multiple times; subsequent calls return immediately. If init() fails, the next call retries (failed promise is discarded). SPORT: packages.md → solar-spa row

Returns

Promise<void>

Promise that resolves when the WASM module is initialized.

Example

import { init, spa } from 'solar-spa';
await init(); // pay WASM startup cost at app boot
const result = await spa(new Date(), 40.7128, -74.0060); // no init overhead