preserves/implementations/javascript/packages/schema/src/base.ts

16 lines
867 B
TypeScript

import { Record, KeyedDictionary } from '@preserves/core';
import { AtomKind, Pattern, Schema } from './meta';
import * as M from './meta';
export const BASE: Schema = Record(M.___schema, [1, new KeyedDictionary<symbol, Pattern, never>([
[Symbol.for('any'), Record(M.___and, [[]])],
[Symbol.for('bool'), Record(M.___atom, [M.___Boolean as AtomKind])],
[Symbol.for('float'), Record(M.___atom, [M.___Float as AtomKind])],
[Symbol.for('double'), Record(M.___atom, [M.___Double as AtomKind])],
[Symbol.for('int'), Record(M.___atom, [M.___SignedInteger as AtomKind])],
[Symbol.for('string'), Record(M.___atom, [M.___String as AtomKind])],
[Symbol.for('bytes'), Record(M.___atom, [M.___ByteString as AtomKind])],
[Symbol.for('symbol'), Record(M.___atom, [M.___Symbol as AtomKind])],
[Symbol.for('ref'), Record(M.___pointer, [])],
])]);