@pansy/react-mapbox-gl
Version:
🌍 基于 Mapbox GL 封装的 React 组件库
13 lines (10 loc) • 425 B
text/typescript
export type { KeysOfUnion } from 'type-fest';
export interface Instance {
on(type: string, handle: (...args: any[]) => void): void;
off(type: string, handle: (...args: any[]) => void): void;
[key: string]: any;
}
export type OptionalId<T> = T extends { id: string } ? Omit<T, 'id'> & { id?: string } : T;
export type OptionalSource<T> = T extends { source: string }
? Omit<T, 'source'> & { source?: string }
: T;