is-typescript

v3.0.1
is-typescript checks whether a package is built using TypeScript.
typescript

is-typescript

is-typescript checks whether a package is built using TypeScript.

Status

Category Status
Version npm
Dependencies David
Dev dependencies David
Build GitHub Actions
License GitHub

Installation

$ npm install is-typescript

Quick start

First you need to integrate is-typescript into your application:

const { isTypeScript } = require('is-typescript');

If you use TypeScript, use the following code instead:

import { isTypeScript } from 'is-typescript';

To check whether a package is built using TypeScript, call the isTypeScript function and provide the root directory of the package as parameter:

console.log(await isTypeScript({ directory: '/...' }));
// => true

The package verifies whether the npm package typescript is installed, and whether a tsconfig.json file exists at the given root directory.

Running quality assurance

To run quality assurance for this module use roboter:

$ npx roboter

Metadata

  • MIT
  • Whatever
  • Unknown
  • released 9/5/2019

Downloads