Compare commits
No commits in common. "22f114d7f939018328bc13d42e3aa5e37ea0581b" and "fbec410c4252b82ad9de63a8a4bb3e48cd216f16" have entirely different histories.
22f114d7f9
...
fbec410c42
4 changed files with 12 additions and 49 deletions
|
@ -1,10 +0,0 @@
|
|||
import { ForType } from '../core/Dispatcher.js'
|
||||
import { GenericReturn } from './type.js'
|
||||
import * as generic from './arithmetic.js'
|
||||
|
||||
export { generic }
|
||||
|
||||
declare module "../core/Dispatcher" {
|
||||
interface ReturnTypes<Params>
|
||||
extends ForType<'numbers', GenericReturn<Params>> { }
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
import { ConservativeUnary, Dependency, ImpType, Signature } from "../core/Dispatcher";
|
||||
|
||||
declare module "./type" {
|
||||
interface GenericReturn<Params> {
|
||||
// Jos: not sure how to define this or why it is needed
|
||||
square: Signature<Params, [T], T>
|
||||
// square: ConservativeUnary<Params, T>
|
||||
// square: Params extends [infer R]
|
||||
// ? R extends number ? UnderlyingReal<R> : never
|
||||
// : never
|
||||
}
|
||||
}
|
||||
|
||||
export const square =
|
||||
<T>(dep: Dependency<'multiply', [T, T]>):
|
||||
ImpType<'square', [T]> =>
|
||||
z => dep.multiply(z, z)
|
|
@ -1,3 +0,0 @@
|
|||
export interface GenericReturn<Params> {
|
||||
|
||||
}
|
|
@ -1,12 +1,11 @@
|
|||
import { configDependency } from '../core/Config.js'
|
||||
import { Signature, ImpType, Dependency } from '../core/Dispatcher.js'
|
||||
import {configDependency} from '../core/Config.js'
|
||||
import {Signature, ImpType} from '../core/Dispatcher.js'
|
||||
|
||||
const DBL_EPSILON = Number.EPSILON || 2.2204460492503130808472633361816E-16
|
||||
|
||||
declare module "./type" {
|
||||
interface NumbersReturn<Params> {
|
||||
equal: Signature<Params, [number, number], boolean>
|
||||
unequal: Signature<Params, [number, number], boolean>
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,9 +25,3 @@ export const equal =
|
|||
|
||||
return false
|
||||
}
|
||||
|
||||
export const unequal = (dep: Dependency<'equal', [number, number]>):
|
||||
ImpType<'unequal', [number, number]> =>
|
||||
(x, y) => {
|
||||
return !dep.equal(x, y)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue