Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bun-types: v1.1.9 Type Errors #11302

Open
btakita opened this issue May 23, 2024 · 0 comments
Open

bun-types: v1.1.9 Type Errors #11302

btakita opened this issue May 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@btakita
Copy link

btakita commented May 23, 2024

What version of Bun is running?

1.1.9+bb13798d9

What platform is your computer?

Linux 6.9.1-arch1-1 x86_64 unknown

What steps can reproduce the bug?

Install bun-types & check-dts.

Run bun -c check-dts

What is the expected behavior?

No Type Errors

What do you see instead?

A whole bunch of type errors coming from bun-types. This happens when I run check-dts on the https://github.com/relysjs/relysjs package. In tsconfig.json, I removed the skipLibChecks: true config.

✖ Check types

✖ ../../node_modules/.pnpm/bun-types@1.1.9/node_modules/bun-types/overrides.d.ts:3:20: Type error TS2305
  Module '"bun"' has no exported member 'PathLike'.

✖ ../../node_modules/.pnpm/elysia@1.0.22_@sinclair+typebox@0.32.30_typescript@5.4.0-dev.20231224/node_modules/elysia/dist/index.d.ts:5:27: Type error TS2307
  Cannot find module 'memoirist' or its corresponding type declarations.

✖ ../../node_modules/.pnpm/elysia@1.0.22_@sinclair+typebox@0.32.30_typescript@5.4.0-dev.20231224/node_modules/elysia/dist/context.d.ts:73:245: Type error TS2536
  Type '{ readonly Continue: 100; readonly 'Switching Protocols': 101; readonly Processing: 102; readonly 'Early Hints': 103; readonly OK: 200; readonly Created: 201; readonly Accepted: 202; readonly 'Non-Authoritative Information': 203; ... 51 more ...; readonly 'Network Authentication Required': 511; }[Code]' cannot be used to index type 'Route["response"]'.

✖ ../../node_modules/.pnpm/bun-types@1.1.9/node_modules/bun-types/bun.d.ts:113:8: Type error TS2420
  Class 'ShellError' incorrectly implements interface 'ShellOutput'.

✖ ../../node_modules/.pnpm/bun-types@1.1.9/node_modules/bun-types/globals.d.ts:151:2: Type error TS2666
  Exports and export assignments are not permitted in module augmentations.

✖ ../../node_modules/.pnpm/@types+node@20.12.12/node_modules/@types/node/module.d.ts:283:13: Type error TS2687
  All declarations of 'dirname' must have identical modifiers.

✖ ../../node_modules/.pnpm/@types+node@20.12.12/node_modules/@types/node/module.d.ts:289:13: Type error TS2687
  All declarations of 'filename' must have identical modifiers.

✖ ../../node_modules/.pnpm/elysia@1.0.22_@sinclair+typebox@0.32.30_typescript@5.4.0-dev.20231224/node_modules/elysia/dist/index.d.ts:772:208: Type error TS2344
  Type '{ [K in keyof (Singleton & NewElysia["_types"]["Singleton"])]: { [K in keyof (Singleton & NewElysia["_types"]["Singleton"])[K]]: (Singleton & NewElysia["_types"]["Singleton"])[K][K]; }; }' does not satisfy the constraint 'SingletonBase'.

✖ ../../node_modules/.pnpm/elysia@1.0.22_@sinclair+typebox@0.32.30_typescript@5.4.0-dev.20231224/node_modules/elysia/dist/index.d.ts:776:142: Type error TS2344
  Type '{ [K in keyof (Singleton & NewElysia["_types"]["Singleton"])]: { [K in keyof (Singleton & NewElysia["_types"]["Singleton"])[K]]: (Singleton & NewElysia["_types"]["Singleton"])[K][K]; }; }' does not satisfy the constraint 'SingletonBase'.

✖ ../../node_modules/.pnpm/elysia@1.0.22_@sinclair+typebox@0.32.30_typescript@5.4.0-dev.20231224/node_modules/elysia/dist/index.d.ts:782:72: Type error TS2344
  Type '{ [K in keyof (Singleton & NewElysia["_types"]["Singleton"])]: { [K in keyof (Singleton & NewElysia["_types"]["Singleton"])[K]]: (Singleton & NewElysia["_types"]["Singleton"])[K][K]; }; }' does not satisfy the constraint 'SingletonBase'.

✖ ../../node_modules/.pnpm/elysia@1.0.22_@sinclair+typebox@0.32.30_typescript@5.4.0-dev.20231224/node_modules/elysia/dist/index.d.ts:788:77: Type error TS2344
  Type '{ [K in keyof (Singleton & LazyLoadElysia["_types"]["Singleton"])]: { [K in keyof (Singleton & LazyLoadElysia["_types"]["Singleton"])[K]]: (Singleton & LazyLoadElysia["_types"]["Singleton"])[K][K]; }; }' does not satisfy the constraint 'SingletonBase'.

✖ ../../node_modules/.pnpm/bun-types@1.1.9/node_modules/bun-types/globals.d.ts:1893:12: Type error TS2687
  All declarations of 'dirname' must have identical modifiers.

✖ ../../node_modules/.pnpm/bun-types@1.1.9/node_modules/bun-types/globals.d.ts:1896:12: Type error TS2687
  All declarations of 'filename' must have identical modifiers.

✖ ../../node_modules/.pnpm/typescript@5.4.0-dev.20231224/node_modules/typescript/lib/lib.dom.d.ts:8138:11: Type error TS2430
  Interface 'EventSource' incorrectly extends interface 'Bun.EventSource'.

✖ ../../node_modules/.pnpm/typescript@5.4.0-dev.20231224/node_modules/typescript/lib/lib.dom.d.ts:15414:11: Type error TS2430
  Interface 'MessageEvent<T>' incorrectly extends interface 'Bun.MessageEvent<T>'.

✖ ../../node_modules/.pnpm/typescript@5.4.0-dev.20231224/node_modules/typescript/lib/lib.dom.d.ts:25362:11: Type error TS2430
  Interface 'WebSocket' incorrectly extends interface 'import("/home/brian/work/ctx-core/ctx-core-dev/node_modules/.pnpm/@types+ws@8.5.10/node_modules/@types/ws/index").WebSocket'.

Additional information

Type errors have been occurring in bun-types for many previous versions. It would be great if the norm is to have no type errors.

@btakita btakita added the bug Something isn't working label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant