Within the same Typescript class, I have declared two different function signatures as shown below:
public emit<T1>(event: string, arg1: T1): void {}
and
public emit<T1,T2>(event: string, arg1: T1, arg2: T2): void {}
Despite having a difference in the number of parameters (2 and 3 respectively), an error is triggered during transpilation:
error TS2393: Duplicate function implementation.
My understanding was that overloading functions in TypeScript was possible, given that the parameter count differs in the function signature. Why then am I facing this issue?