Skip to content

Metamodel: Mixins vs Extends discrepancy  #1933

@TheAngryByrd

Description

@TheAngryByrd

👋 Hey there. I'm working on a generator for F# types using the metamodel. I'm nearly there, however I've run into a what I think may be an discrepancy with the metamodel.

There are some types that are listed as extends in the LSP Spec page but are listed as mixins in the metamodel.


For brevity the definitions of these are:

  • extends: "Structures extended from. This structures form a polymorphic type hierarchy."
  • mixins: "Structures to mix in. The properties of these structures are copied into this structure. Mixins don't form a polymorphic type hierarchy in LSP."

Example of discrepancy:

ImplementationOption lists WorkDoneProgressOptions in the sepc:

export interface ImplementationOptions extends WorkDoneProgressOptions {
}

but in the metamodel it's listed as a mixin:

{
    "name": "ImplementationOptions",
    "properties": [],
    "mixins": [
        {
            "kind": "reference",
            "name": "WorkDoneProgressOptions"
        }
    ]
},

There's also a similar situation for WorkDoneProgressParams.


I'm unsure which is the case, maybe this is my misunderstanding about typescript in general.

Any guidance would be appreciated. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions