-
Notifications
You must be signed in to change notification settings - Fork 8
/
export.d.ts
27 lines (19 loc) · 962 Bytes
/
export.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { use } from 'echarts/core'
import EChartsV4 from 'echarts/lib/echarts'
type UnionToIntersection<U> =
(U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never
type LastOf<T> =
UnionToIntersection<T extends any ? () => T : never> extends () => (infer R) ? R : never
type Push<T extends any[], V> = [...T, V]
type TuplifyUnion<T, L = LastOf<T>, N = [T] extends [never] ? true : false> =
true extends N ? [] : Push<TuplifyUnion<Exclude<T, L>>, L>
type EChartsExtensionInstallRegisters = Parameters<TuplifyUnion<Parameters<typeof use>[0]>[0]>[0]
export type EChartsExtensionRegisters = EChartsExtensionInstallRegisters extends never
? typeof EChartsV4
: EChartsExtensionInstallRegisters
/**
* To install Google Map component
* @param registers echarts registers. If using v4, it should be echarts namespace.
*/
export declare function install(registers: EChartsExtensionRegisters): void
export * from './types'