Last active
March 27, 2019 21:40
-
-
Save jason-s13r/e5f8dc43c748032917b25af478ef94df to your computer and use it in GitHub Desktop.
Typescript type definitions for [vue-signature-pad](https://www.npmjs.com/package/vue-signature-pad), probably not entirely correct.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'vue-signature-pad' { | |
import signature_pad, * as SignaturePad from 'signature_pad'; | |
import Vue from 'vue'; | |
export interface IOptions extends SignaturePad.IOptions {} | |
export interface IPointGroup extends SignaturePad.IPointGroup {} | |
export interface Status { | |
isEmpty: boolean; | |
data?: any; | |
} | |
export default class VueSignaturePad extends Vue { | |
// props | |
width: string; | |
height: string; | |
customStyle: any; | |
saveType: string; | |
options: IOptions; | |
images: any[]; | |
// computer | |
propsImagesAndCustomImages: any[]; | |
// methods | |
resizeCanvas(): void; | |
saveSignature(): Status; | |
undoSignature(): void; | |
mergeImageAndSignature(customSignature: any): Promise<any>; // TODO: constrain to correct return type. | |
addImages(images: any[]): Promise<any>; // TODO: constrain to correct param type and return type. | |
fromDataURL(data: string): void; | |
lockSignaturePad(): void; | |
openSignaturePad(): void; | |
isEmpty(): boolean; | |
getPropImagesAndCacheImages(): any[]; | |
clearCacheImages(): 'this.cacheImages'; | |
clearSignature(): void; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment