From fff6d7b296c87feabe24e433626211db0d2f9e0e Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Fri, 15 Jan 2021 19:38:14 +0100 Subject: [PATCH] fix time definitions --- .gitignore | 1 + package.json | 2 +- time.d.ts | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 time.d.ts diff --git a/.gitignore b/.gitignore index a7056d5..5dee1b9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /coverage/ *.log *.d.ts +!time.d.ts diff --git a/package.json b/package.json index 8aa334a..44afa62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sapphirecode/consts", - "version": "1.2.1", + "version": "1.2.2", "main": "index.js", "author": { "name": "Timo Hocker", diff --git a/time.d.ts b/time.d.ts new file mode 100644 index 0000000..923f021 --- /dev/null +++ b/time.d.ts @@ -0,0 +1,18 @@ +declare interface TimeBase { + ns: number; + us: number; + ms: number; + second: number; + minute: number; + hour: number; + day: number; + week: number; + month: (m: any, y: any) => number; + year: (y: any) => number; +} + +export function base(second?: number): TimeBase; +export declare const base_s: TimeBase; +export declare const base_ms: TimeBase; +export declare const base_us: TimeBase; +export declare const base_ns: TimeBase;