OOP - How to create an interface in Reason

Viewed 122

Let's say I have the following abstractProductA class with a public method called methodA :

class abstractProductA = {
  pub methodA => "name";
};

I would like to create an interface that says function methodA should always return a string. Something similar to

interface abstractProductA {
  abstractProductA(): string
}

only in reason, and then have class implement it. Any suggestions are more than welcome. Thank you

1 Answers
Related