@backland/schema
Version:
TypeScript schema declaration and validation library with static type inference
28 lines (27 loc) • 854 B
TypeScript
import { Store } from '@backland/utils';
import { TSFYConfig } from './tsfy';
export declare const defaultTypesDest: string;
export interface TSFyWriterConfig extends TSFYConfig {
wrappers?: [string, string][];
dest?: string;
writeThrottleMS?: number;
prettify?: boolean;
moduleName?: string;
store?: Store<Record<string, any>>;
}
export declare function tsfyWriter(options?: TSFyWriterConfig): {
toString: () => Promise<string>;
listen: () => Store<Record<string, any>, string, any>;
add: (value: any) => {
hash: string;
};
remove: (value: any) => {
hash: string;
index: number | undefined;
};
store: Store<Record<string, any>, string, any>;
};
export declare function moduleWrapper(init: {
extra?: [string, string][];
moduleName: string;
}): (body: string) => string;