type-analyze
Statically analyze types through comments
// foo : Number -> Number { return x + 1} // TypeError: foo('Hello') doesnt match Number -> Number
This module is a work in progress:
- [ ]: Wildcards in type signature using
*
- [ ]: Infers types of expressions (in functions and identifiers)
- [ ]: Loads identifier type signature
- [ ]: Checks identifier types
- [ ]: Proper support for scopes
Installation
$ npm install --save type-analyze
Usage
analyze(source, options)
-> errors
Analyze source
with options
.
var errors = console// [ TypeError { ... } ]
'errors'
An array of TypeError
objects.
License
MIT © Jamen Marz