Socket
Socket
Sign inDemoInstall

@poi/plugin-typescript

Package Overview
Dependencies
326
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @poi/plugin-typescript

Official TypeScript plugin for Poi.


Version published
Weekly downloads
755
increased by6.49%
Maintainers
3
Install size
7.79 MB
Created
Weekly downloads
 

Readme

Source

@poi/plugin-typescript

Official TypeScript plugin for Poi.

Introduction

This plugin use ts-loader to transpile TypeScript files, it also uses fork-ts-checker-webpack-plugin to perform type-checking. .ts .tsx and .vue files are supported.

It's possible to run Babel alongside TypeScript using the babel option. When used with Babel, it's recommended to set compilerOptions.target to es2015 or later in tsconfig.json to delegate the rest to Babel for auto polyfill based on browser targets.

Install

yarn add @poi/plugin-typescript typescript --dev

How to use

module.exports = {
  plugins: [
    {
      resolve: '@poi/plugin-typescript',
      options: {}
    }
  ]
}

Then add a tsconfig.json in your project:

{
  "compilerOptions": {
    "target": "es5",
    "strict": true,
    "module": "es2015",
    "moduleResolution": "node"
  }
}

Options

babel

  • Type: boolean
  • Default: false

Use Babel after the TypeScript compiler.

lintOnSave

  • Type: boolean
  • Default: true

Lint TS files with ts-lint at compile time, note that it will only work when you have a tslint.json in your project root.

configFile

  • Type: string
  • Default: tsconfig.json

The path to the TypeScript config file.

loaderOptions

  • Type: any

Addtional options for ts-loader.

tscheckerOptions

  • Type: any

Additional options for fork-ts-checker-webpack-plugin.

FAQs

Last updated on 30 Apr 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc