Closed plu closed 6 years ago
Thanks for addressing this. StringCastable
should be the type of the constructor instead of the instance. So implements StringCastable
should be removed from the example.
Thank you, this wasn't clear to me, I'm still new to TS.
I really love clime
and the API it provides, great work you have done here!
I'm wondering if I'm doing something wrong here: The
StringCastable
forces me to implementcast(source: string, context: CastingContext<File>): Promise<File>
, which is then never even called. The static one is actually being called. And unless I implement the static one, I get a runtime error:Error: Type
Filecannot be casted from a string, see
StringCastableinterface for more information