Skip to content

Instantly share code, notes, and snippets.

@bertrandk
Last active September 3, 2023 13:23
Show Gist options
  • Save bertrandk/d26155a71380544f71d5 to your computer and use it in GitHub Desktop.
Save bertrandk/d26155a71380544f71d5 to your computer and use it in GitHub Desktop.
Typescript Voucher Code Generator
interface VoucherCodeConfig {
length?: number;
count?: number;
charset?: string;
prefix?: string;
postfix?: string;
pattern?: string;
}
interface VoucherCodeGenerator {
generate(config?: VoucherCodeConfig): string[];
}
declare var voucher_codes: VoucherCodeGenerator;
declare module 'voucher-code-generator' {
export = voucher_codes;
}
@steve1888
Copy link

thnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment