pseudoloc
pseudoloc copied to clipboard
Add Typescript type definition
It’d be helpful to have a Typescript type definition file.
In the meantime I have the following in a declarations.d.ts file within my project:
declare module 'pseudoloc' {
type Options = {
prepend: string;
append: string;
delimiter: string;
startDelimiter: string;
endDelimiter: string;
extend: number;
override?: string;
};
export type PsuedolocOptions = Partial<Options>;
export const version: string;
export const option: Options;
export function str(text: string): string;
}
It doesn’t expose everything, but it types the parts I’m currently using.