// No Rask-namespaced node type existed.
// Developers had to import from inferno directly or use `any`:
import { InfernoNode } from "inferno";
interface Props {
children: InfernoNode; // breaks out of the Rask namespace
// — or —
children: any; // loses type safety
}// Two equivalent aliases are now available under the Rask namespace:
interface Props {
children: Rask.Children; // idiomatic — mirrors React.ReactNode
// — or —
node: Rask.RaskNode; // convenience alias for the same type
}
// Both cover the full union:
// Inferno.InfernoElement | string | number | boolean | null | undefined | array/fragmentNo additional imports are needed — Rask is a global namespace already declared in the project.
Rask.Childrenshould mirror whatReact.ReactNodeprovides: the broadest useful node unionRask.RaskNodeis a pure convenience alias; both types are identical (InfernoNode)InfernoNodewas already imported intypes.ts, so no new dependency was introduced
- Named the primary alias
Rask.Children(notRask.Node) to stay parallel with theReact.ReactNode/React.Childrennaming convention consumers are familiar with - Added
Rask.RaskNodeas a second alias rather than consolidating, keeping both options available
- Not tested — no test runs observed in the session
flowchart LR
A[npm run build core] --> B{cargo available?}
B -- No --> C[sh: cargo: command not found ❌]
B -- Yes --> D{wasm32-wasip1 target?}
D -- No --> E[E0463: can't find crate for std ❌]
flowchart LR
A[npm run build core] --> B{cargo available?}
B -- Yes --> D{wasm32-wasip1 target?}
D -- Yes --> F[SWC plugin compiles ✅]
The core package includes an SWC plugin that compiles to WebAssembly. Both Rust and the explicit wasm32-wasip1 target are now present on the machine.
- The host is Apple Silicon macOS (
aarch64-apple-darwin) — that native target was installed automatically; only the WASI target needed to be added manually - New terminal sessions will pick up
~/.cargo/envautomatically; existing shells needsource "$HOME/.cargo/env"once
- Used the official
rustupinstaller (curl … | sh -s -- -y) for a non-interactive, non-root install - Added
wasm32-wasip1(the WASI Preview 1 target) rather than the olderwasm32-wasi, matching what the error message specified
cargo --versionconfirmedcargo 1.94.1after installrustup target add wasm32-wasip1completed successfully; build outcome not re-verified in the transcript