Skip to content
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

Typescript error with signature_pad as project dependency. #699

Closed
paulferrett opened this issue Feb 17, 2023 · 1 comment · Fixed by #700
Closed

Typescript error with signature_pad as project dependency. #699

paulferrett opened this issue Feb 17, 2023 · 1 comment · Fixed by #700
Labels

Comments

@paulferrett
Copy link
Contributor

Do you want to request a feature or report a bug?
Report a Typescript compilation error.

What is the current behavior?

When compiling our project which has signature_pad as a dependency, the following typescript error

info  - Checking validity of types...
--
125 | Failed to compile.
126 |  
127 | ./node_modules/signature_pad/src/signature_pad.ts:65:11
128 | Type error: Property '_drawningStroke' has no initializer and is not definitely assigned in the constructor.
129 |  
130 | 63 \|   /* tslint:disable: variable-name */
131 | 64 \|   private _ctx: CanvasRenderingContext2D;
132 | > 65 \|   private _drawningStroke: boolean;
133 | \|           ^
134 | 66 \|   private _isEmpty: boolean;
135 | 67 \|   private _lastPoints: Point[]; // Stores up to 4 most recent points; used to generate a new curve
136 | 68 \|   private _data: PointGroup[]; // Stores all points in groups (one group per line or dot)

Which versions of SignaturePad, and which browser / device are affected by this issue? Did this work in previous versions of SignaturePad?
4.1.4

paulferrett added a commit to RentBetter/signature_pad that referenced this issue Feb 17, 2023
UziTech pushed a commit that referenced this issue Feb 22, 2023
* Fix typescript script errors for uninitialised private properties.
Fixes #699

* Fix for default value for `_isEmpty`.
github-actions bot pushed a commit that referenced this issue Feb 22, 2023
## [4.1.5](v4.1.4...v4.1.5) (2023-02-22)

### Bug Fixes

* initialize private properties. ([#700](#700)) ([fea7ec6](fea7ec6)), closes [#699](#699)
@github-actions
Copy link

🎉 This issue has been resolved in version 4.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant