ts-simple-assertions
v1.0.3
Published
A simple and assertion library for TypeScript
Downloads
2
Readme
ts-assertions
A TypeScript library for type assertions.
Installation
npm install ts-simple-assertions
Usage
import { assert_string } from 'ts-assertions';
const value: any = 'hello';
assertString(value); // No error
assertString(123); // Throws error