Files
discord-clone/node_modules/unctx/dist/transform.d.ts
2023-01-03 09:29:04 -06:00

30 lines
673 B
TypeScript

import MagicString from 'magic-string';
interface TransformerOptions {
/**
* The function names to be transformed.
*
* @default ['withAsyncContext', 'callAsync']
*/
asyncFunctions?: string[];
/**
* @default 'unctx'
*/
helperModule?: string;
/**
* @default 'executeAsync'
*/
helperName?: string;
}
declare function createTransformer(options?: TransformerOptions): {
transform: (code: string, options_?: {
force?: false;
}) => {
code: string;
magicString: MagicString;
};
shouldTransform: (code: string) => boolean;
};
export { TransformerOptions, createTransformer };