thp-lang.org/md/learn/classes/interfaces.md
2023-10-23 20:39:34 -05:00

26 lines
260 B
Markdown

# Interfaces
```thp
interface Serializable
{
// Methods are always public in interfaces
fun serialize($) -> String
}
class Cat -> Serializable
{
pub fun Serializable($) -> String
{
// code
}
}
```
No interface inheritance.