2025-12-18 15:38:35 +00:00
|
|
|
import { Identifier as SharedIdentifier } from "@opencode-ai/util/identifier"
|
2025-05-18 01:31:42 +00:00
|
|
|
|
|
|
|
|
export namespace Identifier {
|
2025-12-18 15:38:35 +00:00
|
|
|
export type Prefix = SharedIdentifier.Prefix
|
2025-05-18 01:31:42 +00:00
|
|
|
|
2025-12-18 15:38:35 +00:00
|
|
|
export const schema = (prefix: Prefix) => SharedIdentifier.schema(prefix)
|
2025-05-18 06:50:38 +00:00
|
|
|
|
2025-12-18 15:38:35 +00:00
|
|
|
export function ascending(prefix: Prefix, given?: string) {
|
|
|
|
|
return SharedIdentifier.ascending(prefix, given)
|
2025-05-18 06:50:38 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-18 15:38:35 +00:00
|
|
|
export function descending(prefix: Prefix, given?: string) {
|
|
|
|
|
return SharedIdentifier.descending(prefix, given)
|
2025-05-18 06:50:38 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-18 15:38:35 +00:00
|
|
|
export function create(prefix: Prefix, descending: boolean, timestamp?: number) {
|
|
|
|
|
return SharedIdentifier.createPrefixed(prefix, descending, timestamp)
|
2025-05-18 01:31:42 +00:00
|
|
|
}
|
|
|
|
|
}
|