typocomath/src/interfaces/relational.ts
Glen Whitney cc1e66c054 Declare implementations and dependencies via standard interfaces for operations (#8)
Adds a new subdirectory `interfaces` where standard interfaces
  are defined. Additional interfaces for a given operation can
  be added with an `AliasOf` type operator. Provides type
  operators that give the return type, full function type, and
  the type of a dependency on, a given operator.

  Resolves #6.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
Reviewed-on: #8
2023-01-22 01:34:57 +00:00

10 lines
301 B
TypeScript

// Warning: a module must have something besides just a "declare module"
// section; otherwise it is ignored.
export type BinaryPredicate<T> = (a: T, b: T) => T
declare module "./type" {
interface Signatures<T> {
equal: (a: T, b: T) => boolean
unequal: (a: T, b: T) => boolean
}
}