Read a compiled node with one shared coercion and diagnostic policy.
import { compile, readAttributes } from '@datamoc/mw_games/mwl';const game = compile("[{ tag: 'game', schema: 0.1 }]");const { value } = readAttributes(game.roots[0]!, { schema: { type: 'string' } });console.log(value.schema); // '0.1' Copy
import { compile, readAttributes } from '@datamoc/mw_games/mwl';const game = compile("[{ tag: 'game', schema: 0.1 }]");const { value } = readAttributes(game.roots[0]!, { schema: { type: 'string' } });console.log(value.schema); // '0.1'
Read a compiled node with one shared coercion and diagnostic policy.