fix this typescript constructor overloading constructor() 7 │ constructor(outco:…
Jump to turn (11)
- 1fix this typescript constructor overloading constructor() 7 │ constructor(outco:
- 2something wrong with this line if (arg1 instanceof Variables && typeof arg2 ===
- 3correct line, Variables is enum
- 4will it be okay to use typeof arg1 === 'Variables' ?
- 5should this line constructor(arg1?: Variables | Outcome | string, arg2?: number
- 6but what about last constructor - constructor(var1: string, or: boolean)
- 7что может болеть у человека справа в районе поясницы
- 8а если боль ассоциирована с приемом пищи? возникает после приема пищи или с утра
- 9а если именно утренние боли натощак
- 10что если боли стали возникать после отказа от курения? есть ли такая взаимосвязь
- 11как долго это может продолжаться, с момента отказа
- User
fix this typescript constructor overloading
constructor()
7 │ constructor(outco: Outcome)
E 6 │ constructor(var1: Variables, val: number, or: boolean = false) ■ A parameter initializer is only allowed in a function or constructor implementation.
E 5 │ constructor(var1: string, val: string, or: boolean = false) ■ A parameter initializer is only allowed in a function or constructor implementation.
E 4 │ constructor(var1: string, or: boolean = false) ■■ A parameter initializer is only allowed in a function or constructor implementation.
3 │
2 │ constructor(arg1?: Variables | Outcome | string, arg2?: number | string, orlimit: boolean = false) {
E 1 │ │ if (arg1 instanceof Variables && typeof arg2 === "number") { ■ The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function'