-
Notifications
You must be signed in to change notification settings - Fork 563
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
Adding typescript to the project #401
base: main
Are you sure you want to change the base?
Conversation
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "vue-draggable-resizable", | |||
"version": "3.0.0-beta.2", | |||
"version": "3.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating current version
parseInt(rect.width), | ||
parseInt(rect.height) | ||
// @ts-ignore | ||
parseInt(rect.width, 10), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe parseInt is not necessary
bounds: { | ||
minLeft: null, | ||
maxLeft: null, | ||
minRight: null, | ||
maxRight: null, | ||
minTop: null, | ||
maxTop: null, | ||
minBottom: null, | ||
maxBottom: null, | ||
}, | ||
|
||
mouseClickPosition: { | ||
mouseX: 0, | ||
mouseY: 0, | ||
x: 0, | ||
y: 0, | ||
w: 0, | ||
h: 0, | ||
left: 0, | ||
bottom: 0, | ||
top: 0, | ||
right: 0, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding default values
|
||
let eventsFor = events.mouse; | ||
|
||
interface State { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating typing interface
parseFloat(style.getPropertyValue('width'), 10), | ||
parseFloat(style.getPropertyValue('height'), 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10: Not necessary
Do you think @mauricius that PR makes sense? |
Hello everything is fine?
I would like to thank you for the library, it is fantastic!
My suggestion with this PR is to contribute to improving the typing in the project
I thank the attention
This closes:
#294
OBS:
[X] All tests passed
[X] Build process working fine
[X] Exporting types
Type autocomplete