AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() Currently, it is just set to “any.” I can try to make my own generic and overwrite the class, but others may find it useful to include a generic Decorations should ideally have a generic to populate spec.No idea why, maybe it’s the internal comment? The SelectionRange class constructor does not seem to be typed.Other than that, we only have ran into a few other issues: ![]() I understand the reasoning though, just wish there was an alternative for those that did use that generic. That is going to make our types worse overall but I’m going to try to find a way to just overwrite the default Schema types so we can retain our ability to look up nodes and marks easily. On top of that, doing checks like won’t yield our main schema so we don’t get intellisense that includes our nodes and marks. However, the lack of schema generics is causing loads of problems for us because we do use multiple schemas under different conditions and looking up nodes. We are trying to upgrade to use the new Prosemirror types and although our type checker basically exploded, the experience has been really good. * with the added guarantee that its `nodes` and `marks`.* The (#model.SchemaSpec) on which the schema is based,.* Construct a schema from a schema (#model.SchemaSpec).* creating and deserializing such documents.* occur in conforming documents, and provides functionality for.* type](#model.MarkType) objects for the nodes and marks that may.DefinitelyTyped/DefinitelyTyped/blob/master/types/prosemirror-model/index.d.ts#L1358 At least I never manually specified them, so I am assuming they were inferred. To your question, I copied those type declarations from the DT types for prosemirror-model, and they did actually properly infer N and M. Ok, you may be right about the extra strictness, that could be noUncheckedIndexedAccess.
0 Comments
Read More
Leave a Reply. |