Update non npm package type definition amap-js-api (#41934)

This commit is contained in:
breeze9527
2020-01-29 10:56:15 -08:00
committed by GitHub
parent c5df2018a4
commit 541c70e340
4 changed files with 28 additions and 1 deletions
+12
View File
@@ -972,6 +972,18 @@ testPixel.toFixed();
// $ExpectType Pixel
testPixel.toFixed(2);
/**
* plugin.ts
*/
AMap.plugin('plugin name', () => {
// callback
});
AMap.service('plugin name', () => {
// callback
});
/**
* size.ts
*/
+1
View File
@@ -15,6 +15,7 @@
/// <reference path="lngLat.d.ts" />
/// <reference path="map.d.ts" />
/// <reference path="pixel.d.ts" />
/// <reference path="plugin.d.ts" />
/// <reference path="size.d.ts" />
/// <reference path="type-util.d.ts" />
/// <reference path="util.d.ts" />
+14
View File
@@ -0,0 +1,14 @@
declare namespace AMap {
/**
* 加载插件,
* @param name 插件名称
* @param callback 插件加载完成后的回调函数
*/
function plugin(plugin: string | string[], callback: () => void): typeof AMap;
/**
* 加载插件,
* @param name 插件名称
* @param callback 插件加载完成后的回调函数
*/
function service(plugin: string | string[], callback: () => void): typeof AMap;
}
+1 -1
View File
@@ -21,4 +21,4 @@
"index.d.ts",
"amap-js-api-tests.ts"
]
}
}