13 lines
348 B
TypeScript
13 lines
348 B
TypeScript
import {ImpType} from '../core/Dispatcher.js'
|
|
|
|
type NumberPredicate = (a: number) => boolean
|
|
declare module "./type" {
|
|
interface NumbersImpTypes {
|
|
isReal: NumberPredicate
|
|
isSquare: NumberPredicate
|
|
}
|
|
}
|
|
|
|
export const isReal: ImpType<'isReal', [number]> = a => true
|
|
export const isSquare: ImpType<'isSquare', [number]> = a => a >= 0
|