codemix / babel-plugin-typecheck

Static and runtime type checking for JavaScript in the form of a Babel plugin.
MIT License
886 stars 44 forks source link

Broken code emitted for rest parameters #36

Closed motiz88 closed 8 years ago

motiz88 commented 8 years ago

The emitted type check for args in the following function references it as ...args which results in a syntax error.

function countArgs(...args: Array<number>): number
{
    return args.length;
}

Will follow up with a PR in a sec :)