ts-gleam
v1.0.1
Published
get type safety when importing .gleam from javascript
Downloads
925
Readme
ts-gleam
TypeScript LSP Plugin for importing Gleam files.
Usage
- Create a new Gleam project.
- In
gleam.toml
, settarget=javascript
and under[javascript]
settypescript_declarations=true
. npm add ts-gleam
- Create a
tsconfig.json
/jsconfig.json
and setcompilerOptions.plugins
to[{"name": "ts-gleam"}]
- Build your Gleam project when ever you have changes and import away!
Note
This does not build and resolve imports for your. All this is, is for the LSP to type check correctly.
For building with Gleam/JavaScript, check out vite-gleam
or to quickly scaffold an app try create-gleam
.