Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typings-tester

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typings-tester

TypeScript definition testing library

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-14.77%
Maintainers
1
Weekly downloads
 
Created
Source

Typings Tester npm version Build Status

A library aimed to aid testing of TypeScript definitions. Checks TypeScript files for syntactic, expected and unexpected semantic (type) errors.

Installation

$ npm install -D typings-tester

Any version of TypeScript must be installed separately.

CLI Usage

$ typings-tester --config path/to/tsconfig.json **/*.ts
 
$ typings-tester --dir path/to/directory

API Usage

import test from "tape";
import {check, checkDirectory} from "typings-tester";


test('typings', assert => {
  assert.doesNotThrow(() => check(['test.ts'], 'tsconfig.json'));
  
  assert.doesNotThrow(() => checkDirectory('src'));
});

Flags

  • typings:expect-error: expect next line or block to contain semantic error. typings-tester will fail if no error is produced.
// typings:expect-error
function shouldFail(a: number): string {
  return a;
}

What's next

  • Testing against multiple versions of TypeScript
  • Inferred type assertions

Keywords

FAQs

Package last updated on 07 Sep 2018

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc