haxetink / tink_web

Tinkerbell Web Framework
https://haxetink.github.io/tink_web
43 stars 14 forks source link

Use the class as type for Remote<T> #88

Closed fullofcaffeine closed 5 years ago

fullofcaffeine commented 5 years ago

I have this sample router class https://github.com/fullofcaffeine/tink-we-proxy-sample/blob/master/Server.hx#L10, and want to setup a Proxy to the browser js client (using JsClient) here: https://github.com/fullofcaffeine/tink-we-proxy-sample/blob/master/Client.hx#L11, while keeping things DRY. However, I get the following error:

Client.hx:12: characters 19-30 : tink.web.proxy.Remote0 has no field json

Does that mean I need to redefine the public interface for the Root class as an interface? That looks a bit redundant , though.

fullofcaffeine commented 5 years ago

Sorry, disregard this issue. I had changed the name of the method to hello and totally missed that in the code (even though the compiler error message clearly says what is wrong) :man_facepalming: Happens it does work fine with the Root class.