You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your following example-code on https://vue3-signature-pad.vercel.app/ does only work, because alert is very tolerant and can deal with the signature void. In true, the method is returning a string.
function handleSaveSignature() {
return signature.value?.saveSignature && alert(signature.value?.saveSignature())
}
To Reproduce
Steps to reproduce the behavior:
use your package in typescript, write:
let imgBase64: string = signaturePad.value?.saveSignature();
You will get the following compile-error
-->Vue: Type void is not assignable to type string
Expected behavior
The methods of your interfaces should return the same types as your wrapped library vue-signature-pad
The text was updated successfully, but these errors were encountered:
Describe the bug
Can not use your library in typescript, as long as all the method return -types are void..
for example:
export interface CanvasSignatureRef {
isCanvasEmpty?: () => void
saveSignature?: (format?: string) => void
clearCanvas?: () => void
undo?: () => void
addWaterMark?: (obj: WaterMarkObj) => void
fromDataURL?: (url: string) => void
}
Your following example-code on https://vue3-signature-pad.vercel.app/ does only work, because alert is very tolerant and can deal with the signature void. In true, the method is returning a string.
function handleSaveSignature() {
return signature.value?.saveSignature && alert(signature.value?.saveSignature())
}
To Reproduce
Steps to reproduce the behavior:
use your package in typescript, write:
let imgBase64: string = signaturePad.value?.saveSignature();
You will get the following compile-error
-->Vue: Type void is not assignable to type string
Expected behavior
The methods of your interfaces should return the same types as your wrapped library vue-signature-pad
The text was updated successfully, but these errors were encountered: