Skip to content

Commit

Permalink
type: Fix type errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 23, 2022
1 parent ebc6933 commit 8d29566
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/types/src/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ declare namespace AMap {
imageSize?: Size;
}
/** 共同部分事件定义 */
private interface EventsCommonProps {
interface EventsCommonProps {
/** 鼠标左键单击事件 */
onClick?(event: MapsEvent): void;
/** 鼠标左键双击事件 */
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/control.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ declare namespace AMap {
/**
* 鹰眼控件,用于显示缩略地图,显示于地图右下角,可以随主图的视口变化而变化,也可以配置成固定位置实现类似于南海附图的效果。
*/
class HawkEye extends Omit<Control, 'addTo' | 'remove'> {
class HawkEye extends Control {
constructor(opts: HawkEyeOptions);
/**
* 恢复鹰眼控件的正常大小
Expand Down
5 changes: 3 additions & 2 deletions packages/types/src/maplayer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,16 @@ declare namespace AMap {
}
interface WMTSLayerOptions extends WMSLayerOptions {}
/** 卫星图层类,继承自 TileLayer。 */
class Satellite extends Omit<TileLayer, 'setTileUrl', 'reload'> {
class Satellite extends TileLayer {
// class Satellite extends Omit<typeof TileLayer, 'setTileUrl', 'reload'> {
constructor(opts: SatelliteLayerOptions);
/** 销毁图层 */
destroy(): void;
}
/** 卫星图层类,继承自 TileLayer。 */
interface SatelliteLayerOptions extends Omit<TileLayerOptions, 'tileUrl' | 'dataZooms'> {}
/** 实时交通图层类,继承自TileLayer。 */
class Traffic extends Omit<TileLayer, 'setTileUrl', 'reload'> {
class Traffic extends TileLayer {
constructor(opts: TrafficLayerOptions);
/** 停止自动更新数据 */
stopFresh(): void;
Expand Down

1 comment on commit 8d29566

@vercel
Copy link

@vercel vercel bot commented on 8d29566 May 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-amap – ./

react-amap-398188662.vercel.app
react-amap-git-master-398188662.vercel.app
react-amap-one.vercel.app

Please sign in to comment.