Skip to content

Commit

Permalink
fix: 增加类型定义 (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceLanniste authored Jun 6, 2024
1 parent 8f893ca commit 1517819
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
9 changes: 1 addition & 8 deletions typings/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ declare module '*.vue' {
}

declare global {
declare module 'fabric/fabric-impl' {
interface IObjectOptions {
/**
* 标识
*/
id?: string | undefined;
}
}
declare module 'fabric/fabric-impl' {}
}

export as namespace vfe;
Expand Down
14 changes: 14 additions & 0 deletions typings/extends.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ declare namespace fabric {
rotate: number;
}

export interface IObjectOptions {
/**
* 标识
*/
id?: string | undefined;
}

export interface IUtil {
findScaleToFit: (
source: Record<string, unknown> | fabric.Object,
destination: Record<string, unknown> | fabric.Object
) => number;
}

function ControlMouseEventHandler(
eventData: MouseEvent,
transformData: Transform,
Expand Down

0 comments on commit 1517819

Please sign in to comment.