-
-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Report
The same error did occurs in the @next
version.
📝 Summary
Template:
import typia from 'typia'
type A = boolean
export const randomA = typia.createRandom<A>()
Generated:
import * as __typia_transform__randomBoolean from "typia/lib/internal/_randomBoolean.js";
import { Training } from "./pruneTypes/payload-types.js";
import typia from 'typia';
type A = boolean;
export const randomA = (() => { let _generator: Partial<import("typia").IRandomGenerator> | undefined; return (generator?: Partial<import("typia").IRandomGenerator>): import("typia").Resolved<A> => {
_generator = generator;
return (_generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean)({
type: "boolean"
});
}; })();
And the generated code got a TS error: _randomBoolean
Expected 0 arguments, but got 1.
- Typia Version: 9.7.1
- Expected behavior:
return (_generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean)();
- Actual behavior: the generated code have an extra argument.
return (_generator?.boolean ?? __typia_transform__randomBoolean._randomBoolean)({
type: "boolean"
});
⏯ Playground Link
Thanks
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working