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

New type definition is incompatible with Quill.DeltaStatic #30

Closed
buu700 opened this issue Sep 27, 2018 · 2 comments
Closed

New type definition is incompatible with Quill.DeltaStatic #30

buu700 opened this issue Sep 27, 2018 · 2 comments

Comments

@buu700
Copy link

buu700 commented Sep 27, 2018

Not sure if this is intentional, but after updating to the latest quill and quill-delta, stuff like quill.setContents(new Delta()) no longer compiles unless I add an <any> cast to the Delta object.

Argument of type 'Delta' is not assignable to parameter of type 'DeltaStatic'.
  Types of property 'reduce' are incompatible.
    Type '<T>(predicate: (accum: T, curr: Op, index: number) => T, initialValue: T) => T' is not assignable to type '<T>(predicate: (acc: T, curr: DeltaOperation, idx: number, arr: DeltaOperation[]) => T, initial: T) => T'.
      Types of parameters 'predicate' and 'predicate' are incompatible.
@jhchen
Copy link
Member

jhchen commented Sep 28, 2018

Quill does not officially maintain Typescript type definitions. Unofficial definitions were added including DeltaStatic but now that Delta itself is in Typescript there is no need for DeltaStatic and such definitions should be updated. I would suggest notifying whoever maintains these definitions.

@jhchen jhchen closed this as completed Sep 28, 2018
@buu700
Copy link
Author

buu700 commented Sep 28, 2018

Oops, sorry about that! I should've caught that that was from an @types package; I'll resubmit this issue with the maintainer of that.

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

2 participants