Skip to content

Commit

Permalink
feat: 弱化 AMap.plugin 和 map.plugin 类型
Browse files Browse the repository at this point in the history
为了更好的与 promise 配合使用
  • Loading branch information
xyy94813 committed Mar 13, 2024
1 parent 9647f0c commit 68fcea4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions types/Map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ export declare class Map extends Event<MapEventType> {
setLabelRejectMask(reject?: boolean): void;

/** 加载插件 */
plugin(pluginName: string, cb: () => void): any;
plugin(pluginNames: string[], cb: () => void): any;
plugin(pluginName: string, cb: Function): any;
plugin(pluginNames: string[], cb: Function): any;

/**
* 重新计算容器大小
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ declare global {
export function createDefaultLayer(opts?: any): BaseLayer | any;

/** 加载插件 */
export function plugin(pluginName: string, cb: () => void): void;
export function plugin(pluginNames: string[], cb: () => void): void;
export function plugin(pluginName: string, cb: Function): void;
export function plugin(pluginNames: string[], cb: Function): void;

/**
* 为坐标转换类,支持将其他坐标系的坐标点转换为高德坐标系。坐标转换方法
Expand Down

0 comments on commit 68fcea4

Please sign in to comment.