reflect.AnyFunction

Implemented automatically by every function value, with its parameter list erased. `Returns` pins the held function's return type and `Throws` its error type; both default to `unknown`, so a bare `AnyFunction` accepts any function. A compiler builtin: it cannot be implemented by hand, cannot be used as a generic bound, and declares no methods. Call the held function through `reflect.call_any`; read its signature with `reflect.signature`.

Reference version

Signature

interface reflect.AnyFunction

Implemented automatically by every function value, with its parameter list erased. Returns pins the held function's return type and Throws its error type; both default to unknown, so a bare AnyFunction accepts any function. A compiler builtin: it cannot be implemented by hand, cannot be used as a generic bound, and declares no methods. Call the held function through reflect.call_any; read its signature with reflect.signature.

Source:<builtin>/reflect/reflect.bamlbytes 24022630

Associated types

type Returns

= unknown

type Throws

= unknown