Closed afshawnlotfi closed 3 years ago
Add a notp.d.ts file to your @types folder
declare module 'notp' {
export const hotp: {
gen: (key: string, opt?: { time?: number; _t?: Date }) => string;
verify: (
token: string,
key: string,
opt?: { time?: number },
) => { delta: number } | null;
};
export const totp: {
gen: (key: string, opt?: { time?: number; _t?: Date }) => string;
verify: (
token: string,
key: string,
opt?: { time?: number; _t?: Date },
) => { delta: number } | null;
};
}
Hi, I love this library because it is super minimal and gets the job done. The only problem is it doesn't have any type definitions for Typescript. Was wondering if there were any plans on creating type definitions otherwise I will just create one on DefinetlyTyped @types repo.