import { CrochetType, CrochetValue, ForeignInterface, Machine, State } from "../runtime"; export declare type Class = { new (...args: any[]): T; }; declare type AnyClass = typeof CrochetValue | Class; export declare type UnwrapClass = T extends Class ? U : T extends typeof CrochetValue ? CrochetValue : never; export declare type Instances = Cs extends [infer A, ...infer Rs] ? [UnwrapClass, ...Instances] : Cs extends [infer A] ? [UnwrapClass] : Cs extends [] ? [] : never; export declare class ForeignNamespace { private ffi; private namespace; constructor(ffi: ForeignInterface, namespace: string); private namespaced; deftype(name: string, type: CrochetType): this; defun[]>(name: string, types: [...T], fn: (...args: Instances) => CrochetValue): this; defmachine[]>(name: string, types: [...T], fn: (state: State, ...args: Instances) => Machine): this; defun1(name: string, fn: (...args: CrochetValue[]) => CrochetValue): this; defmachine1(name: string, fn: (state: State, ...args: CrochetValue[]) => Machine): this; } export {};