diff --git a/core/math/src/math.ts b/core/math/src/math.ts index 60b0ee42e..999bd2f29 100644 --- a/core/math/src/math.ts +++ b/core/math/src/math.ts @@ -1,8 +1,6 @@ import {TransformRangeOptions} from './type.js'; export * from './unicode-digits.js'; -import type {DurationString, DurationUnit} from '@alwatr/type'; - /** * Number.isFinite simple polyfill */ @@ -156,6 +154,8 @@ export const random = { shuffle: (array: T[]): T[] => array.sort(() => random.value - 0.5), } as const; +export type DurationUnit = 's' | 'm' | 'h' | 'd' | 'w' | 'M' | 'y'; +export type DurationString = `${number}${DurationUnit}`; const unitConversion = { s: 1_000, m: 60_000, diff --git a/core/nano-server/src/type.ts b/core/nano-server/src/type.ts index 5b709dbb3..6b98f7384 100644 --- a/core/nano-server/src/type.ts +++ b/core/nano-server/src/type.ts @@ -59,3 +59,6 @@ export interface ConnectionConfig { */ allowAllOrigin: boolean; } + +export type ParamKeyType = 'string' | 'number' | 'boolean'; +export type ParamValueType = string | number | boolean | null; diff --git a/core/type/src/index.ts b/core/type/src/index.ts index e7133a1c5..6cde561dd 100644 --- a/core/type/src/index.ts +++ b/core/type/src/index.ts @@ -3,6 +3,7 @@ export * from './service-response.js'; export * from './storage.js'; export * from './alwatr.js'; export * from './math.js'; +export * from './type-helper.js'; Alwatr.registeredList.push({ name: '@alwatr/type',