I am quite new to typescript and i am wondering if (probably is) its possible to extend a type coming from an installed library?
for example i have added a library wich exports this type:
export declare type RequestParams2_0_0 = {
version: '2.0.0';
typeNames: string;
count?: number;
};
but I need it to be like this:
export declare type RequestParams2_0_0 = {
version: '2.0.0';
typeNames: string;
count?: number;
bbox?: [number, number, number, number]
};
it would not make sense (or would it?) to just change it in the library (in this case WfsDataParser.d.ts). i would like to extend this somehow in my code that it accepts bbox
without changing the library.
currently i import the Type like so:
import { WfsDataParser, RequestParams, RequestBaseParams } from 'geostyler-wfs-parser'
and this is how RequestParams
looks in the WfsDataParser.d.ts
export declare type RequestParams = GetFeatureOptionalParams & (RequestParams1_1_0 | RequestParams2_0_0);
but RequestParams needs to accept another paramerter... how would i do that?
Thank you so much!