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

Property 'restrictSize' not included in type definition #657

Closed
kreuzersteve opened this issue Aug 18, 2018 · 3 comments
Closed

Property 'restrictSize' not included in type definition #657

kreuzersteve opened this issue Aug 18, 2018 · 3 comments

Comments

@kreuzersteve
Copy link

kreuzersteve commented Aug 18, 2018

Expected behavior

interact.js library compatible with Angular 5/6 since it also provides its own type definitons

Actual behavior

Error when running a webpack prod build:

error TS2345: Argument of type '{ edges: { left: boolean; right: string; bottom: boolean; top: boolean; }; restrictSize: { min: {...' is not assignable to parameter of type 'ResizableOptions'.
--
18-Aug-2018 23:37:10 | Object literal may only specify known properties, and 'restrictSize' does not exist in type 'ResizableOptions'.

Used to work for me until an hour ago when the external type definitions for interact.js got deprecated: https://www.npmjs.com/package/@types/interact.js
Fix => integrate the restrictSize and snapSize properties to the ResizableOptions type definition;
I can provide a PR if that helps.
This issue probably related to #647

System configuration

interact.js 1.3.4
Chrome 68.0.3440.106
Win10

EDIT: Another error I'm getting since the deprecation of the alternative type definitions is:
property rect does not exist on type 'InteractiveEvent'
I used to use this for resizing:

target.style.width  = event.rect.width + 'px';
target.style.height = event.rect.height + 'px';
@garrettmaring
Copy link

Typings for interactjs are fairly incomplete and out of date sadly.

@AlexAndBear
Copy link

Counting on 1.4.0

@taye
Copy link
Owner

taye commented Jan 28, 2019

Duplicate of #623

@taye taye marked this as a duplicate of #623 Jan 28, 2019
@taye taye closed this as completed Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants