Hi, what should the equivalent in Kotlin of this d...
# javascript
a
Hi, what should the equivalent in Kotlin of this d.ts code :
Copy code
class Test {
    readonly a: string
    b: number

    c(): typeof Test
}
I mean, what
typeof Test
should be in Kotlin ? I thought of
Class<Test>
but I guess it's not right
g
fun c(): Test ?
b
Typeof in ts basically returns a class as an interface so you could use that with duck typing
So in kotlin that remains Test (no duck typing so no apparent benefit)