-
Notifications
You must be signed in to change notification settings - Fork 652
Open
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Now request interfaces like DistanceMatrixRequest
, GeocodeRequest
extends AxiosRequestConfig
which has params (type: any).
In my case I just want to omit key from request params because we set key globally, so I defined following interface.
interface IKeyOmittedGeocodeRequest extends Omit<GeocodeRequest, 'params'> {
params: Omit<Pick<GeocodeRequest, 'params'>, 'key'>;
}
But as GeocodeRequest
extends AxiosRequestConfig
which has params, TypeScript
recognizes params in IKeyOmittedGoecodeRequest
from AxiosRequestConfig
which is any.
And it doesn't recognize request.params.destinations
.
Metadata
Metadata
Assignees
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.