Open chrisjameslennon opened 8 months ago
import { Schema, validate } from "jtd";
in javascript (i.e. not typescript) gives runtime error SyntaxError: Named export 'Schema' not found. The requested module 'jtd' is a CommonJS module, which may not support all module.exports as named exports.
SyntaxError: Named export 'Schema' not found. The requested module 'jtd' is a CommonJS module, which may not support all module.exports as named exports.
I guess 'Schema' is just typescript type so it doesn't have any representation on js side https://github.com/jsontypedef/json-typedef-js/blob/master/src/schema.ts#L18
in javascript (i.e. not typescript) gives runtime error
SyntaxError: Named export 'Schema' not found. The requested module 'jtd' is a CommonJS module, which may not support all module.exports as named exports.