0.3.1 • Published 6 months ago

typescript-plugin-toml v0.3.1

Weekly downloads
16
License
MIT
Repository
github
Last release
6 months ago

typescript-plugin-toml

npm version automatic deploy MIT License

A typescript language service plugin providing support for toml files.

example

Usage

npm i -D typescript-plugin-toml # yarn add -D typescript-plugin-toml

And then add this to tsconfig.json.

{
  "compilerOptions": {
    "plugins": [{ "name": "typescript-plugin-toml" }]
  }
}

If you're using VSCode, switch to workspace version.

.const.toml

If the file name ends with .const.toml, the typings will become as if you are using as const.

For example it will be like below.

test.toml and test.const.toml

key = 'val'

index.ts

import test from './test.toml'
import testConst from './test.const.toml'

type Test = typeof test // { key: string }
type TestConst = typeof testConst // { readonly key: 'val' }
0.3.1

6 months ago

0.2.0

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago