feat: Barest outline of a Dispatcher, providing only typeOf so far (#11)

Reviewed-on: #11
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
Glen Whitney 2024-10-25 15:27:02 +00:00 committed by Glen Whitney
parent 3bc55fc3e0
commit 06909a6a5e
3 changed files with 136 additions and 11 deletions

View file

@ -1,5 +1,10 @@
import {inspect} from 'node:util'
import {assemble} from '@/core/Dispatcher'
import * as specifications from './all'
console.log(inspect(specifications, {depth: 18, colors: true}))
const math = assemble(specifications)
console.log('PRODUCED', math)
console.log(math.typeOf(17))
console.log(math.typeOf({re: 3.4, im: -0.1}))
console.log(math.typeOf({re: {re: 1, im: 0}, im: {re: 0, im: -1}}))
console.log(math.typeOf('no string type yet'))