Search code examples
hhvmhacklang

What is "Transformable" in Hack language?


This Facebook example shows, how Hack transpiler removes Transformable type hint from both transform() and wonderland() functions. Why? Is Transformable some built-in Hack interface or class?


Solution

  • It's not anything special at all. It's just an example of an arbitrary type annotation. One of the things that the tool does is remove type annotations, such as Transformable (assuming you had a class called Transformable yourself), or Foo, or Blah, or any other class you define. There's nothing special about Transformable at all.