-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript declaration file #21
Comments
I don't have experience with TypeScript, so I'm not confident in my ability to maintain a declaration file at this time. If there were a contributor who could maintain it, then I'd be okay with that, but otherwise I think a third-party typing makes more sense at this time. As |
I've submitted a PR with definitions. In the meantime I've dropped a file in my source repo declare module 'react-signature-canvas' {
// signature_pad's props
export interface IOptions {
dotSize?: number | (() => number);
minWidth?: number;
maxWidth?: number;
minDistance?: number;
backgroundColor?: string;
penColor?: string;
throttle?: number;
velocityFilterWeight?: number;
onBegin?: (event: MouseEvent | Touch) => void;
onEnd?: (event: MouseEvent | Touch) => void;
}
// props specific to the React wrapper
export interface SignatureCanvasProps extends IOptions {
canvasProps?: any;
clearOnResize?: boolean;
}
export default class SignatureCanvas extends React.Component<SignatureCanvasProps> {}
} |
I've created a PR to DefinitelyTyped as discussed in #25 |
Will be locking this now as a tracking issue. A TS re-write is in progress (#25 (comment)) so official internal TS support is planned for the v1.1.x release of |
Can you add a typeScript declaration file in the project plz?
like this #5 but an updated version
The text was updated successfully, but these errors were encountered: