A final (?) prototype for a refactor of mathjs, culminating the picomath, pocomath, typomath series. Provides an extensible core with "fuzzy" types for its operations, that can at any time generate exact .d.ts file for its current state.
Glen Whitney
8dcf74c5d1
I swapped in the new macro in source files numbers/predicate.ts, Complex/arithmetic.ts, and Complex/predicate.ts. Note that you have to specify whether you are reflecting the generic or concrete implementations, which in some cases will mean two separate macro calls (as in Complex/predicate.ts). Also tried out the $$typeMetadata macro in Complex/all.ts; you can see the result by building and looking at build/Complex/all.js. It splits things up somewhat but we would still need to do a bunch of parsing, so probably not worth switching. |
||
---|---|---|
etc | ||
src | ||
.gitignore | ||
.npmrc | ||
LICENSE | ||
package.json5 | ||
pnpm-lock.yaml | ||
README.md | ||
tsconfig.json |
typocomath
A final (?) prototype for a refactor of mathjs, culminating the picomath, pocomath, typomath series. Provides an extensible core with "fuzzy" types for its operations, that can at any time generate exact .d.ts file for its current state.
Convenience scripts:
pnpm build
-- compile the packagepnpm exec
-- run the compiled code produced bypnpm build
pnpm go
-- both of the above in sequence.
Important installation note:
after pnpm install
, you must execute npx ts-patch install
to activate the ts-macros compiler plugin.