dukat
dukat copied to clipboard
Support `typeof` type query
In typescript typeof can be used for in type signature, like in following example
declare object something {
version: string;
buildNumber: number;
}
type Something = typeof something;
declare function logSomething(s: Something)
This is a part of bigger task - to cover type queries in general, but just like always, let's eat this elephant piece by piece (I'm sorry, elephant!)
Actually it looks like it will always make sense to inherit object from an interface but let's be back to this when we come up with a decent proposal for naming generated interfaces.
This was an issue for @testing-library/react. See https://kotlinlang.slack.com/archives/C5ZTZ6ER0/p1596262406123900?thread_ts=1592559379.077800&cid=C5ZTZ6ER0