20 lines
327 B
Plaintext
20 lines
327 B
Plaintext
=== tests/cases/compiler/interfaceSubtyping.ts ===
|
|
interface iface {
|
|
>iface : iface
|
|
|
|
foo(): void;
|
|
>foo : () => void
|
|
}
|
|
class Camera implements iface{
|
|
>Camera : Camera
|
|
>iface : iface
|
|
|
|
constructor (public str: string) {
|
|
>str : string
|
|
}
|
|
foo() { return "s"; }
|
|
>foo : () => string
|
|
>"s" : "s"
|
|
}
|
|
|