fastify / tsconfig

Shared TypeScript configuration for fastify projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tsconfig

Shared TypeScript configuration for fastify projects

Install

$ npm install --save-dev fastify-tsconfig

Usage

Extend your own tsconfig.json file from fastify-tsconfig and override/add the desired settings. By default no outDir is set (because of this issue) , so be sure to add one.

tsconfig.json

{
  "extends": "fastify-tsconfig",
  "compilerOptions": {
    "outDir": "build",
    "target": "es2018",
    "lib": ["es2018"]
  }
}

Check the other settings here

Configuration target

The configuration targets es2018, that is supported in Node.js 10 and later. There is only one feature that is is missing from Node.js v10: Proxy "ownKeys" . However using es2018 as target makes some widely used features ("object rest properties", "object spread properties", and "Asynchronous Iterators") not being transpiled. To target some other version, just override target property.

License

Licensed under MIT.


Inspired by: sindresorhus/tsconfig

About

Shared TypeScript configuration for fastify projects

License:MIT License