✓
Passing This code compiles and runs correctly.
Code
// Phase 2: a helper module with a `.kjs` extension is discovered and imported
// the same way a `.kz` helper would be. The proc body uses |zig variant —
// Phase 2 is about file discovery, not about wiring a JS emitter. The
// extension is purely organizational at this layer.
import std/io
import app/helper
app/helper:greet(name: "World"): g |> std/io:print.ln("{{ g:s }}")
Supporting Files
// Helper module sitting in a .kjs file. Phase 2 file-discovery should
// resolve `~import app/helper` to this file just as it would for
// `helper.kz`.
const std = @import("std");
~pub tor greet { name: string } -> string
~proc greet|zig {
return "Hello!";
}
~proc greet|js {
return "Hello!";
}
Actual
Hello!
Must succeed:
Compile and run without errors.
Expected output
Hello!
Flows
flow ~greet click a branch to expand · @labels scroll to their anchor
greet (name: "World")
Test Configuration
MUST_RUN
koru.json:
{
"paths": {
"std": "../../../../../koru_std",
"app": "."
}
}