typescript-book icon indicating copy to clipboard operation
typescript-book copied to clipboard

Hi,I have a question about ts equal check.

Open AaronConlon opened this issue 2 years ago • 1 comments

image I use bunjs to exec a ts file:

console.log('1' == 1)

TypeScript will not throw error.So, is your description is right? thanks.

AaronConlon avatar Mar 08 '23 14:03 AaronConlon

Yes, the description is correct.

When executing a TS file, Bunjs doesn't check the file for typescript errors.

See: https://bun.sh/docs/runtime/typescript#running-ts-files

Note — Similar to other build tools, Bun does not typecheck the files. Use tsc (the official TypeScript CLI) if you're looking to catch static type errors.

plbstl avatar Jun 20 '23 09:06 plbstl