andremm / typedlua

An Optional Type System for Lua
563 stars 53 forks source link

How to create interface that contains a reference to itself #117

Closed daurnimator closed 5 years ago

daurnimator commented 5 years ago

e.g. I have an object where a method in it returns an object with the same type.

interface foo
    const clone : (self) -> foo
    const get : (self, string) -> (string*)
end
daurnimator commented 5 years ago

Nevermind, my mistake. foo needed to be inside of parenthesis.