8000 Perhaps even deeper type checkin of mixed traits? · Issue #2 · traits-ts/core · GitHub
[go: up one dir, main page]

Skip to content

Perhaps ev 951A en deeper type checkin of mixed traits? #2

@rse

Description

@rse

Feedback on Reddit from "oorza" was:

  1. You sidestepped the diamond problem by flattening the type hierarchy, but provide no facilities for even raising a warning when names collide within mixins. You should not allow a class that already implements a method to be passed to your class factory that also implements it. You can type this.

  2. This only works if the objects or classes themselves are being passed covariantly. An invariant or contravariant method that would otherwise accept a class will not accept it post “mixing in.”

Traits-TS should attempt to address those issues if technically possible at all.

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

      0