This message was deleted.
# getting-started
s
This message was deleted.
d
Function types, like generics, are erased. You can not check for
() -> Int
, you can only check for
() -> Any?
. To do that you use the normal
is
operator:
thing is () -> Any?
m
So
thing is () -> Any?
would return true for a class implementing
() -> Int
?
d
Yes, but it would also be true for a class implementing
() -> String
m
Yes, of course. Thanks!
d
Note that this does not seem to work in JS, it only checks for any function