Skip to content

SignalContainer has a useless T generic #418

@TekExplorer

Description

@TekExplorer

the signature for signal container is; SignalContainer<T, Arg, S extends ReadonlySignalMixin<T>>

However, looking at the actual code, T is never actually used, and actually resolves to dynamic by my code lens.

For the sake of easier use and extension, I say the erroneous generic can be removed entirely, and subclasses can reapply it if needed.

Well, unless there's a real use for it, in which case please let me know.

Certainly not extensions, as we can extract the T with ease

extension <T, Arg, S extends ReadonlySignalMixin<T>> on SignalContainer<Arg, S> {
  T valueOf(Arg arg) => this(arg).value;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions