import { Type } from "../type"; import { typeOf } from "./type-of"; import { value } from "./value"; export const num = typeOf('number'); export const bigint = typeOf('bigint'); export const str = typeOf('string'); export const bool = typeOf('boolean'); export const fn = typeOf('function'); export const sym = typeOf('symbol'); export const undef = typeOf('undefined'); export const nil = value(null); export const obj = typeOf('object'); export function maybe(check: Type): Type { return check.or(nil); }