ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

[TS] Merge the "number" type into PriorityString

Open Reinmar opened this issue 3 years ago • 0 comments

Followup of: https://github.com/ckeditor/ckeditor5/issues/11708 Part of: https://github.com/ckeditor/ckeditor5/issues/12027

Right now we define a type of e.g. on()'s options.priority param as PriorityString | number.

For me, the number is part of PriorityString. Everywhere where we expect the priority, we also allow a number version of it.

So, the proposal is to:

  • Move number to PriorityString to simplify its use.
  • Keep the current name of this union to avoid increasing visibility of the fact that a number can be used (which should be done only in special cases).

Reinmar avatar Aug 03 '22 14:08 Reinmar