Closed nrser closed 8 years ago
just noticed that the return type on the fat arrow function doesn't make any sense but it shouldn't make any difference.
Ah sure, thanks for reporting. Here https://github.com/gcanti/babel-plugin-tcomb/blob/master/src/index.js#L530 I wrongly used an identifier but there is a proper ast node: thisExpression. Will fix asap
Released a fix
awesome, i'll upgrade and try it out
i'm using version
0.3.17
and seeing fat-arrow functions lose theirthis
binding when they have return types declared.source:
compiled with
skipAsserts = false
:running produces
works fine with
skipAsserts = true
:notice the
_this = this
and_this.x
that are missing from the top compilation.for now i just set
skipAsserts = true
to mitigate it. thanks in advance, Neil.