Within my TypeScript class, I have the following two methods:
authorize(resource: any, requirement: Requirement) : boolean {
return false;
}
authorize(resource: any, policy: Policy) : boolean {
return false;
}
Despite the different argument types (policy and requirement), an error is occurring:
Duplicate function implementation.
I'm puzzled as to why this duplication is happening. Any insights on how to resolve this issue?
What would be the best approach to tackle this problem?