Types are missing for `tesseract-wasm/node`
MatteoGauthier opened this issue · comments
Mattèo Gauthier commented
Hey I just noticed a TS error when used with node
import { createOCRClient } from "tesseract-wasm/node";
Cannot find module 'tesseract-wasm/node' or its corresponding type declarations.ts(2307)
Robert Knight commented
Thanks for the report. The types in this package are currently only for the "root" tesseract-wasm
import. Making types work for tesseract-wasm/node
will involve using TS's support for the exports
field in package.json to specify where to find types, per https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing.