Functions
Properties typed as functions are forged as callable stubs that return a forged value of the return type.
Callable properties
Every invocation forges a new value of the return type. Arguments are accepted and ignored — the stub is a data source, not a mock with behavior.
Return types are respected
Whatever the return type is, it follows the regular forging rules:
Void and untyped returns
A function without a return type (() => void or a bare signature) forges as a callable returning null:
Functions vs methods
Only function-typed properties become callables. Class methods (greet(): string) are forged as data properties of the return type — calling them fails, because they are strings, not functions. To keep a method callable, pin it:
See Objects for what class forging includes and Caveats for the full list of quirks.
Forging a function directly
A top-level function type argument is forged the same way: