4 ms·
The `return this as any` in this codebase was chosen because it was the easiest/quickest route not because it was necessary. Tbh I'm not paid by this company e
by culi 1y ago
The `return this as any` in this codebase was chosen because it was the easiest/quickest route not because it was necessary.
Tbh I'm not paid by this company enough to spend time breaking down the correct solution but it would involve validating and discriminating the result of `this.add`.
This code is NOT type-safe and will be harder to maintain. Someone will make a change in the future that changes the possible results of `this.add` and TypeScript will not be able to warn you about the consequences of that change.