Skip to content

Commit

Permalink
fix(type): revert paramkey
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Jan 1, 2023
1 parent f16d97d commit f1ad066
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/math/src/math.ts
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down Expand Up @@ -156,6 +154,8 @@ export const random = {
shuffle: <T>(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,
Expand Down
3 changes: 3 additions & 0 deletions core/nano-server/src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ export interface ConnectionConfig {
*/
allowAllOrigin: boolean;
}

export type ParamKeyType = 'string' | 'number' | 'boolean';
export type ParamValueType = string | number | boolean | null;
1 change: 1 addition & 0 deletions core/type/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f1ad066

Please sign in to comment.