Closed neverfox closed 11 years ago
Yeah, that makes sense. defer
is an IcedCoffeeScript keyword, which is rewritten by the compiler. However, there's any easy workaround:
system["defer"] defer dfd
This should work, let me know if not...
Thanks. I should have thought to do that.
The above mentioned workaround also comes handy for people using the defer function in underscore.js.
I'm using a library (Durandal) that has a function
system.defer
that takes one argument, a callback. You would normally write:I get compile errors when I try to do this in IcedCoffeeScript:
It doesn't seem to be able to tell that the first
defer
, even though it's a method ofsystem
isn't an IcedCoffeeScript directive.