mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
35 lines
432 B
TypeScript
35 lines
432 B
TypeScript
//// [tests/cases/compiler/duplicateIdentifierDifferentModifiers.ts] ////
|
|
|
|
//// [duplicateIdentifierDifferentModifiers.ts]
|
|
// Not OK
|
|
interface B { x; }
|
|
interface B { x?; }
|
|
|
|
// OK
|
|
class A {
|
|
public y: string;
|
|
}
|
|
|
|
interface A {
|
|
y: string;
|
|
}
|
|
|
|
// Not OK
|
|
class C {
|
|
private y: string;
|
|
}
|
|
|
|
interface C {
|
|
y: string;
|
|
}
|
|
|
|
|
|
//// [duplicateIdentifierDifferentModifiers.js]
|
|
"use strict";
|
|
// OK
|
|
class A {
|
|
}
|
|
// Not OK
|
|
class C {
|
|
}
|