From 882671369c2ce86f189bf94aeb265b6c2dc398b1 Mon Sep 17 00:00:00 2001 From: Peter Staples Date: Wed, 24 May 2023 13:56:50 +0100 Subject: [PATCH] Added type declarations for ESM support --- index.d.ts | 4 ++++ index.d.ts.map | 1 + lib/character-sets.d.ts | 9 +++++++++ lib/character-sets.d.ts.map | 1 + lib/random.d.ts | 12 ++++++++++++ lib/random.d.ts.map | 1 + lib/util.d.ts | 8 ++++++++ lib/util.d.ts.map | 1 + 8 files changed, 37 insertions(+) create mode 100755 index.d.ts create mode 100755 index.d.ts.map create mode 100755 lib/character-sets.d.ts create mode 100755 lib/character-sets.d.ts.map create mode 100755 lib/random.d.ts create mode 100755 lib/random.d.ts.map create mode 100755 lib/util.d.ts create mode 100755 lib/util.d.ts.map diff --git a/index.d.ts b/index.d.ts new file mode 100755 index 0000000..de7dc1c --- /dev/null +++ b/index.d.ts @@ -0,0 +1,4 @@ +export function randomPassword(opts: any): any; +export function randomString(opts: any): any; +export * from "./lib/character-sets"; +//# sourceMappingURL=index.d.ts.map diff --git a/index.d.ts.map b/index.d.ts.map new file mode 100755 index 0000000..7a5116e --- /dev/null +++ b/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAeA,+CAuDC;AAqDD,6CAUC"} diff --git a/lib/character-sets.d.ts b/lib/character-sets.d.ts new file mode 100755 index 0000000..527e280 --- /dev/null +++ b/lib/character-sets.d.ts @@ -0,0 +1,9 @@ +export var lower: string; +export var upper: string; +export var consonants: string; +export var vowels: string; +export var digits: string; +export var symbols: string; +export var fullSymbols: string; +export var copyableSymbols: string; +//# sourceMappingURL=character-sets.d.ts.map \ No newline at end of file diff --git a/lib/character-sets.d.ts.map b/lib/character-sets.d.ts.map new file mode 100755 index 0000000..6ed9dfd --- /dev/null +++ b/lib/character-sets.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"character-sets.d.ts","sourceRoot":"","sources":["character-sets.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/random.d.ts b/lib/random.d.ts new file mode 100755 index 0000000..6f00c03 --- /dev/null +++ b/lib/random.d.ts @@ -0,0 +1,12 @@ +declare var _default: Random; +export default _default; +export function Random(randomSource: any): void; +export class Random { + constructor(randomSource: any); + _randomSource: any; + choose(choices: any): any; + getInt(upperBoundExclusive: any): number; + _getInt(upperBoundExclusive: any): number; + shuffle(items: any): any[]; +} +//# sourceMappingURL=random.d.ts.map \ No newline at end of file diff --git a/lib/random.d.ts.map b/lib/random.d.ts.map new file mode 100755 index 0000000..c68942d --- /dev/null +++ b/lib/random.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["random.js"],"names":[],"mappings":";;AAMA,gDAKC;;IALD,+BAKC;IADC,mBAAiC;IAGnC,0BAMC;IAED,yCAYC;IAED,0CAaC;IAED,2BAOC"} \ No newline at end of file diff --git a/lib/util.d.ts b/lib/util.d.ts new file mode 100755 index 0000000..762afa1 --- /dev/null +++ b/lib/util.d.ts @@ -0,0 +1,8 @@ +export function assign(...args: any[]): any; +export function intersection(left: any, right: any): string[]; +export function isInteger(n: any): boolean; +export function isString(s: any): boolean; +export function range(n: any): any; +export function repeat(val: any, n: any): any; +export function toArray(x: any): any; +//# sourceMappingURL=util.d.ts.map \ No newline at end of file diff --git a/lib/util.d.ts.map b/lib/util.d.ts.map new file mode 100755 index 0000000..21db711 --- /dev/null +++ b/lib/util.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AAEA,4CAcC;AAID,8DAgBC;AAID,2CAEC;AAID,0CAEC;AAID,mCAEC;AAID,8CAEC;AAID,qCAEC"} \ No newline at end of file