Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface IOptions {

// props specific to the React wrapper
export interface SignatureCanvasProps extends IOptions {
canvasProps?: any,
canvasProps?: React.CanvasHTMLAttributes<object>,
Copy link
Owner

Choose a reason for hiding this comment

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

should the generic type be <object>?

Copy link
Owner

Choose a reason for hiding this comment

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

or maybe leave it as a generic as <T>?: React.CanvasHTMLAttributes<T>? I'm not totally sure why it's a generic or best practices around them in TS

Copy link
Owner

Choose a reason for hiding this comment

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

Pretty sure it should be a generic as that's referencing not the object containing the HTML attributes, but the attributes themselves which can be of various types, giving the object various potential shapes

clearOnResize?: boolean
}

Expand Down