Add flow typed file.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 17 May 2020 21:10:54 +0000 (23:10 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 17 May 2020 21:10:54 +0000 (23:10 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
flow-typed/npm/uuid_v8.x.x.js [new file with mode: 0644]

diff --git a/flow-typed/npm/uuid_v8.x.x.js b/flow-typed/npm/uuid_v8.x.x.js
new file mode 100644 (file)
index 0000000..496cf8b
--- /dev/null
@@ -0,0 +1,74 @@
+// flow-typed signature: 1b555a8f791762f2a4ee29e1335a175a
+// flow-typed version: a40f6e5201/uuid_v8.x.x/flow_>=v0.104.x
+
+declare module 'uuid' {
+  // v1 (Timestamp)
+  declare type V1Options = {|
+    node?: $ReadOnlyArray<number>,
+    clockseq?: number,
+    msecs?: number,
+    nsecs?: number,
+    random?: $ReadOnlyArray<number>,
+    rng?: () => $ReadOnlyArray<number>,
+  |};
+
+  declare export function v1(options?: V1Options): string;
+
+  declare export function v1(
+    options: V1Options | null,
+    buffer: Array<number>,
+    offset?: number
+  ): Array<number>;
+
+  // v3 (Namespace)
+  declare function v3Impl(
+    name: string | $ReadOnlyArray<number>,
+    namespace: string | $ReadOnlyArray<number>
+  ): string;
+
+  declare function v3Impl(
+    name: string | $ReadOnlyArray<number>,
+    namespace: string | $ReadOnlyArray<number>,
+    buffer: Array<number>,
+    offset?: number
+  ): Array<number>;
+
+  declare export var v3: {|
+    [[call]]: typeof v3Impl,
+    DNS: string,
+    URL: string,
+  |};
+
+  // v4 (Random)
+  declare type V4Options = {|
+    random?: $ReadOnlyArray<number>,
+    rng?: () => $ReadOnlyArray<number>,
+  |};
+
+  declare export function v4(options?: V4Options): string;
+
+  declare export function v4(
+    options: V4Options | null,
+    buffer: Array<number>,
+    offset?: number
+  ): Array<number>;
+
+  // v5 (Namespace)
+  declare function v5Impl(
+    name: string | $ReadOnlyArray<number>,
+    namespace: string | $ReadOnlyArray<number>
+  ): string;
+
+  declare function v5Impl(
+    name: string | $ReadOnlyArray<number>,
+    namespace: string | $ReadOnlyArray<number>,
+    buffer: Array<number>,
+    offset?: number
+  ): Array<number>;
+
+  declare export var v5: {|
+    [[call]]: typeof v5Impl,
+    DNS: string,
+    URL: string,
+  |};
+}