Change the array type in DOMOutputSpec to readonly #73

Merged
lastnigtic merged 1 commit from master into master 2022-07-27 12:12:52 +02:00
lastnigtic commented 2022-07-26 06:49:15 +02:00 (Migrated from github.com)
image

As shown above, I think that the type of toDOM2 is assignable to DOMOutputSpec,but in the current version it is not assignable .

Would it be better to add a readonly array type for DOMOutputSpec?

<img width="762" alt="image" src="https://user-images.githubusercontent.com/17680884/180924822-98faf0b8-fad3-43c9-a0c0-e58ecc6f20c9.png"> As shown above, I think that the type of `toDOM2` is assignable to `DOMOutputSpec`,but in the current version it is not assignable . Would it be better to add a readonly array type for `DOMOutputSpec`?
marijnh commented 2022-07-26 14:16:20 +02:00 (Migrated from github.com)

Could you change this to just have the readonly array, not both readonly and read-write, in the type?

Could you change this to just have the readonly array, not both readonly and read-write, in the type?
lastnigtic commented 2022-07-26 14:48:24 +02:00 (Migrated from github.com)

Could you change this to just have the readonly array, not both readonly and read-write, in the type?

Done, please check

> Could you change this to just have the readonly array, not both readonly and read-write, in the type? Done, please check
marijnh commented 2022-07-27 12:13:02 +02:00 (Migrated from github.com)

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-model!73
No description provided.