Skip to content

Create new declaration file for native build #2506

@querolita

Description

@querolita

Right now, the type declarations for TS live in plonk_wasm.d.ts. Despite having overwritten in node_backend.js the FFIs and types that have been reimplemented with napi on Rust , TS is still expecting those types to have a WASM-like shape (contains pointers, etc). This forces us to ab-use any and unknown in the native conversion layer. In runtime, the objects that TS will receive will indeed have the napi shape (thanks to the conversion bundle switch between wasm and napi), but at compile time they are still expected to be WASMs.

When all of this is in place, we should regenerate the type definitions napi build --dts to produce an equivalent plonk_napi.d.ts, so that the conversion layer can be correctly typed.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions