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

false-positive return type error #159

Closed Riim closed 8 years ago

Riim commented 8 years ago
    _setViewerFromData(data): { ok: boolean } {
        return {
            ok: true
        };
Function returned an invalid type.

Expected:
{
  ok: bool
}

Got:
{ }
  90 |
  91 |  _setViewerFromData(data): { ok: boolean } {
> 92 |      return {
     |      ^
  93 |          ok: true
  94 |      };
prewk commented 8 years ago

Duplicate of #155

gajus commented 8 years ago

Closing as duplicate of #155.