-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update uuid typings and remove deprecated deep import of uu…
…id/v4
- Loading branch information
1 parent
460e825
commit 77fbc17
Showing
8 changed files
with
77 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
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, | ||
|}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters