mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
deprecation(uuid): rename V1Options
to GenerateOptions
(#4872)
* refactor(uuid): deprecate `V1Options` in favor of `GenerateOptions` * tweak
This commit is contained in:
parent
1e194f746b
commit
a0b0f4c553
13
uuid/v1.ts
13
uuid/v1.ts
@ -33,8 +33,16 @@ let _clockseq: number;
|
||||
let _lastMSecs = 0;
|
||||
let _lastNSecs = 0;
|
||||
|
||||
/**
|
||||
* Options for {@linkcode generate}.
|
||||
*
|
||||
* @deprecated This will be removed in 1.0.0. Use {@linkcode GenerateOptions}
|
||||
* instead.
|
||||
*/
|
||||
export interface V1Options extends GenerateOptions {}
|
||||
|
||||
/** Options for {@linkcode generate}. */
|
||||
export interface V1Options {
|
||||
export interface GenerateOptions {
|
||||
/**
|
||||
* An array of 6 bytes that represents a 48-bit IEEE 802 MAC address.
|
||||
*
|
||||
@ -97,14 +105,13 @@ export interface V1Options {
|
||||
* ```
|
||||
*/
|
||||
export function generate(
|
||||
options?: V1Options | null,
|
||||
options: GenerateOptions = {},
|
||||
buf?: number[],
|
||||
offset?: number,
|
||||
): string | number[] {
|
||||
let i = (buf && offset) || 0;
|
||||
const b = buf ?? [];
|
||||
|
||||
options ??= {};
|
||||
let { node = _nodeId, clockseq = _clockseq } = options;
|
||||
|
||||
if (node === undefined || clockseq === undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user