dukat icon indicating copy to clipboard operation
dukat copied to clipboard

Support `typeof` type query

Open Schahen opened this issue 5 years ago • 2 comments

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!)

Schahen avatar May 04 '20 22:05 Schahen

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.

Schahen avatar May 04 '20 22:05 Schahen

This was an issue for @testing-library/react. See https://kotlinlang.slack.com/archives/C5ZTZ6ER0/p1596262406123900?thread_ts=1592559379.077800&cid=C5ZTZ6ER0

epabst avatar Aug 01 '20 06:08 epabst