IdGeneratorOptions
Defined in: src/util/id.ts:24
Options for createIdGenerator.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Prefix extends string |
string |
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
format |
IdFormat |
The id format. Persisted ids depend on it, so a product never changes it. | src/util/id.ts:26 |
now? |
() => number |
Clock for the time-sortable formats (unix ms). Default Date.now. |
src/util/id.ts:33 |
prefixes? |
readonly Prefix[] |
The allowed prefixes. When given, the prefix union is inferred from it and newId rejects any other prefix at runtime. |
src/util/id.ts:31 |