46 lines
739 B
Text
46 lines
739 B
Text
=== tests/cases/compiler/server.ts ===
|
|
|
|
export interface I {
|
|
>I : I
|
|
|
|
prop: string;
|
|
>prop : string
|
|
}
|
|
export interface I2 {
|
|
>I2 : I2
|
|
|
|
prop2: string;
|
|
>prop2 : string
|
|
}
|
|
export class C implements I {
|
|
>C : C
|
|
>I : I
|
|
|
|
prop = "hello";
|
|
>prop : string
|
|
>"hello" : string
|
|
}
|
|
export class C2 implements I2 {
|
|
>C2 : C2
|
|
>I2 : I2
|
|
|
|
prop2 = "world";
|
|
>prop2 : string
|
|
>"world" : string
|
|
}
|
|
|
|
=== tests/cases/compiler/client.ts ===
|
|
import { C, I, C2 } from "server"; // Shouldnt emit I and C2 into the js file and emit C and I in .d.ts file
|
|
>C : typeof C
|
|
>I : any
|
|
>C2 : typeof C2
|
|
|
|
export type cValInterface = I;
|
|
>cValInterface : I
|
|
>I : I
|
|
|
|
export var cVal = new C();
|
|
>cVal : C
|
|
>new C() : C
|
|
>C : typeof C
|
|
|