Skip to content

Instantly share code, notes, and snippets.

@sleexyz
Created July 9, 2017 18:36
Show Gist options
  • Save sleexyz/aa6d776da9ee4f36244f401d31b2333d to your computer and use it in GitHub Desktop.
Save sleexyz/aa6d776da9ee4f36244f401d31b2333d to your computer and use it in GitHub Desktop.
callable classes cannot be extended
/* @flow */
declare class Callable<A, B> {
(A): B
}
class WithFoo<A, B> extends Callable<A, B> {
foo() {
}
}
@sleexyz
Copy link
Author

sleexyz commented Jul 9, 2017

flow v0.49.1:

7: class WithFoo<A, B> extends Callable<A, B> {
         ^ property `foo`. Property not found in
. Object

https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVATApgYxgQwCcsw98BncsAYXxgICMYsAeAQQBowAhAPjADeqMGAAUbAJQAuHqgC+6MpTAB1AJYAXABYAxOHHZc+YLAA8NWAHYYqteviatOPfkJFR9oiYOFgFcoA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment