@sern/handler
Version:
A complete, customizable, typesafe, & reactive framework for discord bots.
25 lines (24 loc) • 694 B
TypeScript
export declare const parseCallsite: (site: string) => {
name: string;
absPath: string;
};
export declare const shouldHandle: (pth: string, filenam: string) => {
exists: boolean;
path: string;
};
/**
* Import any module based on the absolute path.
* This can accept four types of exported modules
* commonjs, javascript :
* ```js
* exports = commandModule({ })
* //or
* exports.default = commandModule({ })
* ```
* esm javascript, typescript, and commonjs typescript
* export default commandModule({})
*/
export declare function importModule<T>(absPath: string): Promise<{
module: T;
}>;
export declare function readRecursive(dir: string): AsyncGenerator<string>;