mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
084e5ebc00
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: andrewbranch <[email protected]>
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
classConstructorOverloadsAccessibility.ts(2,2): error TS2385: Overload signatures must all be public, private or protected.
|
|
classConstructorOverloadsAccessibility.ts(3,2): error TS2385: Overload signatures must all be public, private or protected.
|
|
classConstructorOverloadsAccessibility.ts(11,2): error TS2385: Overload signatures must all be public, private or protected.
|
|
|
|
|
|
==== classConstructorOverloadsAccessibility.ts (3 errors) ====
|
|
class A {
|
|
public constructor(a: boolean) // error
|
|
~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2385: Overload signatures must all be public, private or protected.
|
|
protected constructor(a: number) // error
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2385: Overload signatures must all be public, private or protected.
|
|
private constructor(a: string)
|
|
private constructor() {
|
|
|
|
}
|
|
}
|
|
|
|
class B {
|
|
protected constructor(a: number) // error
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2385: Overload signatures must all be public, private or protected.
|
|
constructor(a: string)
|
|
constructor() {
|
|
|
|
}
|
|
}
|
|
|
|
class C {
|
|
protected constructor(a: number)
|
|
protected constructor(a: string)
|
|
protected constructor() {
|
|
|
|
}
|
|
}
|
|
|
|
class D {
|
|
constructor(a: number)
|
|
constructor(a: string)
|
|
public constructor() {
|
|
|
|
}
|
|
} |