[bun init] Typescript -> Put bun-types Inside @types Folder #1007
mahdi-farnia
started this conversation in
General
Replies: 1 comment 1 reply
-
There are 2 ways:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As you know when a
@types/*
packages installed it goes tonode_modules/@types/*
folder. And every things works properly withoutreference directive
(/// <reference types="bun-types"
) syntax or addingtypes
to tsconfigcompilerOptions
.When i tried to init a new project using
bun init
every things worked properly except typings:Cannot find name Bun
. Until I figured out that typescript did not findbun-types/types.d.ts
file, and i add it tocompilerOptions
and error gone.I think bun-types should goes to
@types
folder instead of node_modules top level.OS: MacOS 12.5
Version: 0.1.7 (latest right now)
Typescript Version: 4.7.4
Beta Was this translation helpful? Give feedback.
All reactions