ts-gleam ![npm](https://img.shields.io/npm/v/ts-gleam)
TypeScript LSP Plugin for importing Gleam files.
Usage
- Create a new Gleam project.
- In
gleam.toml
, set target=javascript
and under [javascript]
set typescript_declarations=true
. npm add ts-gleam
- Create a
tsconfig.json
/jsconfig.json
and set compilerOptions.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
.