In a module that depends on suretype 3.0.0, the following code:
import { v } from "suretype";
Results in the tsc error:
src/types.ts:1:19 - error TS7016: Could not find a declaration file for module 'suretype'. '.../node_modules/suretype/dist/index-nodejs.js' implicitly has an 'any' type.
A workaround is to explicitly import "suretype/dist/index-nodejs.js"
https://github.com/grantila/suretype/blob/f3e62294f02c7ec98ab60fa25a69bb3c392b5d74/package.json#L13
package.json should have:
The current value is missing "js".
In a module that depends on suretype 3.0.0, the following code:
Results in the
tsc
error:A workaround is to explicitly import
"suretype/dist/index-nodejs.js"