Skip to content

Commit

Permalink
chore: update ts decoration
Browse files Browse the repository at this point in the history
  • Loading branch information
semdy committed Jul 25, 2023
1 parent 6364342 commit a0fb903
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface IPoint {
export type IMouseEvent = MouseEvent & { stageX: number; stageY: number }

export interface IOptions {
root: HTMLElement | null
width?: number | 'auto'
height?: number | 'auto'
openSmooth?: boolean
Expand All @@ -33,14 +32,16 @@ export interface IOptions {
onDrawUp?: (evt: IMouseEvent, img: HTMLImageElement) => void
}

export type ConstructorOptions = IOptions & { root: HTMLElement | null }

export default class Signature {
static defaultOptions: IOptions

constructor(options?: IOptions)
constructor(options?: ConstructorOptions)

setLineWidth: (width: number) => void
setColor: (color: string) => void
setOptions: (options: Omit<IOptions, 'root'>) => void
setOptions: (options: IOptions) => void
clear: () => void
undo: () => void
redo: () => void
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "h5-signature",
"version": "0.2.7",
"version": "0.2.8",
"description": "h5 signature",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down

0 comments on commit a0fb903

Please sign in to comment.