mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
38 lines
597 B
TypeScript
38 lines
597 B
TypeScript
//// [tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts] ////
|
|
|
|
//// [classImplementsMergedClassInterface.ts]
|
|
declare class C1 {
|
|
x : number;
|
|
}
|
|
|
|
interface C1 {
|
|
y : number;
|
|
}
|
|
|
|
class C2 implements C1 { // error -- missing x
|
|
}
|
|
|
|
class C3 implements C1 { // error -- missing y
|
|
x : number;
|
|
}
|
|
|
|
class C4 implements C1 { // error -- missing x
|
|
y : number;
|
|
}
|
|
|
|
class C5 implements C1 { // okay
|
|
x : number;
|
|
y : number;
|
|
}
|
|
|
|
//// [classImplementsMergedClassInterface.js]
|
|
"use strict";
|
|
class C2 {
|
|
}
|
|
class C3 {
|
|
}
|
|
class C4 {
|
|
}
|
|
class C5 {
|
|
}
|