New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

typescript-plugin-toml

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-plugin-toml

A typescript language service plugin providing support for toml files.

latest
Source
npmnpm
Version
0.5.0
Version published
Weekly downloads
551
231.93%
Maintainers
0
Weekly downloads
 
Created
Source

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' }

Keywords

typescript

FAQs

Package last updated on 27 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts