Skip to content
Discussion options

You must be logged in to vote

The first way you used is valid.
A faster way to do it skipping the runtime type checking is:

someMyInterface: prop<MyInterface>().withSetter()

if you want runtime type checking then an interface is not enough, you need to tell the runtime how it should be type checked (which is what types.object is actually doing)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Tsury
Comment options

Answer selected by Tsury
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants