prevwong / reka.js

💎 State management system to build any no-code editor
https://reka.js.org/
MIT License
646 stars 48 forks source link

Better error handling #129

Open prevwong opened 10 months ago

prevwong commented 10 months ago

Create an invalid Type throws an error that's difficult to read/debug:

import * as t from '@rekajs/types';

t.binaryExpression({
  left: t.componentTemplate(...), // invalid, throws an error that's difficult to read
  operator: '+',
  right: t.literal({ value: 0 }),
});