release: WRNexusJS 0.8.0
This commit is contained in:
@@ -200,3 +200,10 @@ test("parses edge and worker execution targets", () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test("maps literal unions to their runtime primitive types", async () => {
|
||||
const { runtimeTypeOf } = await import("../src/types.ts");
|
||||
expect(runtimeTypeOf('"_blank" | "_self"')).toBe("string");
|
||||
expect(runtimeTypeOf("1 | 2 | 3")).toBe("number");
|
||||
expect(runtimeTypeOf("true | false")).toBe("boolean");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user