Im developing a package using bun but I am encountering issue at build time when I extend Struct :
for example:
export class PublicInput extends Struct({ root: Field, given: Field }) {
static empty() {
return new PublicInput({ root: Field(0), given: Field(0) });
}
}
will return :
The inferred type of 'PublicInput' cannot be named without a reference to '../../../node_modules/o1js/dist/node/lib/field.js'. This is likely not portable. A type annotation is necessary.
https://github.com/iam-robi/ozkarjs/blob/main/src/lib/zkprogram/query.ts#L130
Are we missing some export from o1js or am I missing something ?