18 lines
465 B
TypeScript
18 lines
465 B
TypeScript
|
import Specifications from '../core/Dispatcher'
|
||
|
|
||
|
declare module 'Dispatcher' {
|
||
|
namespace Specifications {
|
||
|
export class NumberSpecifications {}
|
||
|
namespace NumberSpecifications {
|
||
|
export const number_type = {
|
||
|
before: ['Complex'],
|
||
|
test: (n: unknown): n is number => typeof n === 'number',
|
||
|
from: {string: s => +s}
|
||
|
}
|
||
|
export const zero = (a: number) => 0
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export {Specifications}
|