Skip to content

Commit

Permalink
feat(Overlay): getExtData 返回类型调整
Browse files Browse the repository at this point in the history
  • Loading branch information
xyy94813 committed Mar 25, 2024
1 parent b7d2e06 commit 7f1e727
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion types/overlays/Overlay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export declare class Overlay<
/**
* 获取自定义数据
*/
getExtData(): ExtraData | {};
getExtData(): ExtraData;
/**
* OverlayGroup 类用来包装其它覆盖物类的实例,对实例集合做整体操作
* 其中能够批量 setOptions 大概率该方法是现在抽象的类别里
Expand Down
2 changes: 1 addition & 1 deletion types/overlays/Overlay.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ expectError<void>(overlay2.setExtData({ a: 1 }));

expectType<any>(overlay1.getExtData());
// TODO: 返回值类型需要修改?
expectType<Record<string, string> | {}>(overlay2.getExtData());
expectType<Record<string, string>>(overlay2.getExtData());

expectType<void>(overlay1.setOptions({}));

Expand Down

0 comments on commit 7f1e727

Please sign in to comment.