grantila/suretype

suretype 3.0.0 package.json has incorrect "types" value

mkfmnn opened this issue ยท 2 comments

"types": "./dist/index-node.d.ts",

package.json should have:

 "types": "./dist/index-nodejs.d.ts", 

The current value is missing "js".

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"

absolutely right, thanks for this!

๐ŸŽ‰ This issue has been resolved in version 3.0.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€