mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
564 B
TypeScript
24 lines
564 B
TypeScript
// Type definitions for flakge-idgen 0.1.4
|
|
// Project: https://github.com/T-PWK/flake-idgen
|
|
// Definitions by: Yuce Tekol <http://yuce.me/>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node" />
|
|
|
|
|
|
interface ConstructorOptions {
|
|
datacenter?: number;
|
|
worker?: number;
|
|
id?: number;
|
|
epoch?: number;
|
|
seqMask?: number;
|
|
}
|
|
|
|
declare namespace FlakeId {}
|
|
|
|
declare class FlakeId {
|
|
constructor(options?: ConstructorOptions);
|
|
next(callback?: (err: Error, id: Buffer) => void): Buffer;
|
|
}
|
|
export = FlakeId;
|