Toward its goal, this commit also: * Adds a new section of logical functions, and defines `not`, `and`, `or` for all current types. * Extends `OneOf` choice/union type to allow argument types that are themselves `OneOf` types. * Adds a readable .toString() method for TypePatterns. * Defines negate (as a no-op) and isnan (as always true) for the Undefined type * Extends comparisons to the Undefined type (to handle comparing vectors of different lengths)
7 lines
177 B
JavaScript
7 lines
177 B
JavaScript
import {promoteBinary, promoteUnary} from './helpers.js'
|
|
|
|
export const not = promoteUnary('not')
|
|
export const and = promoteBinary('and')
|
|
export const or = promoteBinary('or')
|
|
|
|
|