New type definition is incompatible with Quill.DeltaStatic
Closed this issue · 2 comments
buu700 commented
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 commented
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.
buu700 commented
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.