is-typescript
v4.0.7
Published
is-typescript checks whether a package is built using TypeScript.
Downloads
287
Keywords
Readme
is-typescript
is-typescript checks whether a package is built using TypeScript.
Status
| Category | Status | | ---------------- | ---------------------------------------------------------------------------------------------------------- | | Version | | | Dependencies | | | Dev dependencies | | | Build | | | License | |
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