Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI fails on files with no type annotations #4

Closed
ahamid opened this issue Sep 21, 2012 · 1 comment
Closed

CLI fails on files with no type annotations #4

ahamid opened this issue Sep 21, 2012 · 1 comment

Comments

@ahamid
Copy link
Contributor

ahamid commented Sep 21, 2012

// define a namespace
if (typeof MyNameSpace == "undefined") {
  var MyNameSpace = this.MyNameSpace = {};
}

Run without extract:

typedjs namespace.js

namespace.js: ✘
null
Done.

Due to internal error:

[TypeError: Cannot read property '0' of undefined]

Because TypedJS run_tests_on_string function does not return results array when there are no types to check; returns undefined/non return value instead. Probabaly a TypedJS bug.

trivial patch coming

@ahamid
Copy link
Contributor Author

ahamid commented Sep 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants