Skip to main content

Interface: SnowflakeGenerateOptions

@sapphire/snowflake.SnowflakeGenerateOptions

Options for Snowflake#generate

Properties

increment

โ€ข Optional increment: bigint

The increment to use

default 0n

remark keep in mind that this bigint is auto-incremented between generate calls

Defined in

projects/utilities/packages/snowflake/src/lib/Snowflake.ts:128


processId

โ€ข Optional processId: bigint

The process ID to use, will be truncated to 5 bits (0-31)

default 1n

Defined in

projects/utilities/packages/snowflake/src/lib/Snowflake.ts:140


timestamp

โ€ข Optional timestamp: number | bigint | Date

Timestamp or date of the snowflake to generate

default Date.now()

Defined in

projects/utilities/packages/snowflake/src/lib/Snowflake.ts:121


workerId

โ€ข Optional workerId: bigint

The worker ID to use, will be truncated to 5 bits (0-31)

default 0n

Defined in

projects/utilities/packages/snowflake/src/lib/Snowflake.ts:134