typeomatica
TypeScript icon, indicating that this package has built-in type declarations

0.3.36 • Public • Published

Type ø matica

Coverage Status

NPM GitHub package.json version GitHub last commit

$ npm install typeomatica

This package is a part of mnemonica project.

Strict Types checker for objects which represent Data Types.

how it works

see test/index.ts

class SimpleBase extends BasePrototype {
	stringProp = '123';
};

// nect code line will work properly
simpleInstance.stringProp = '321';

// but next code line will throw TypeError('Type Mismatch')
// @ts-ignore
simpleInstance.stringProp = 123;

That is it. It will be impossible to assign anything else except of:

typeof something === 'string'

to stringProp in runtime.

As we describe Data Types — please take a peek for tests directory: HERE.

/typeomatica/

    Package Sidebar

    Install

    npm i typeomatica

    Weekly Downloads

    12

    Version

    0.3.36

    License

    MIT

    Unpacked Size

    71.3 kB

    Total Files

    53

    Last publish

    Collaborators

    • went.out