How to add different precedences for decorations within the same Plugin Extension

I want to create an extensions with different precedences for different decorations, I have a use case where I would like to create a mark decoration, which wraps another mark decoration, but I would like to do this within the same extension. This is possible as stated in the mark decoration reference, but I am not sure how should I go about doing this.

My extension for example:

export const Plugin = ViewPlugin.fromClass(class {
    constructor(view) {
        this.higher_prec_decorations = return_high_prec_decoration(view)
        this.lower_prec_decorations = return_low_prec_decoration(view)
    }

    update(update) {
    if (update.docChanged || update.viewportChanged)
        this.higher_prec_decorations = return_high_prec_decoration(update.view)
        this.lower_prec_decorations = return_low_prec_decoration(update.view)
    }
}, {
    decorations: v => v.?, // How do I return different prec decorations here?
})

Thanks.

You’ll want to use provide, not decorations, and return an array holding two instances of EditorView.decorations, accessing those fields in your plugin.