Closed huypham50 closed 2 weeks ago
What! Do you have the latest version? 0.7.1?
Latest version should have "types": "./dist/index.d.ts" not "types": "./dist/src/index.d.ts"
Anyway, I’m about to update the build process this week, I’ll make sure to fix this swiftly if it’s still in the latest version.
Yep latest version 0.7.1
and the .d.ts
is in the wrong place.
If I import { dereference } from "@scalar/openapi-parser/dist/src";
then the type errors go away but there's a compile error instead
Module not found: Package path ./dist/src is not exported from package /Users/johndoe/Desktop/code/repo/node_modules/@scalar/openapi-parser (see exports field in /Users/johndoe/Desktop/code/repo/node_modules/@scalar/openapi-parser/package.json)
Oh man, I’ll fix that. Thanks for the great bug report!
It’s more than just fixing the pass. Some type definition files land in random places. But #127 fixes it.
Thanks, I will test once change is live!
Fixed already. ✌️
What happens?
What did you expect to happen?
Should have no type errors since package is written in Typescript (which is great!)
How can we reproduce the issue?
yarn add @scalar/openapi-parser
tsconfig.json
next.config.js
Swagger/OpenAPI Example
No response