google-maps-js-api-react
Version:
Fast, tree-shakable, and light-weight React components and hooks for integrating Google Maps API functionality
18 lines (15 loc) • 543 B
text/typescript
/// <reference types="google.maps" />
type TypicalInstance = google.maps.MVCObject & {
setOptions(options: any): void;
};
type OptionsOf<Instance extends TypicalInstance> = NonNullable<Parameters<Instance['setOptions']>[0]>;
type CommonProps<Instance extends TypicalInstance> = {
defaultOptions: OptionsOf<Instance>;
};
type PreventLoadProps = {
/**
* if `true` loading of required lib will not be started by render of component
*/
preventLoad?: boolean;
};
export type { CommonProps as C, PreventLoadProps as P };