Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give dom.Value a more specific constructor #575

Open
zslayton opened this issue Mar 5, 2020 · 0 comments
Open

Give dom.Value a more specific constructor #575

zslayton opened this issue Mar 5, 2020 · 0 comments

Comments

@zslayton
Copy link
Contributor

zslayton commented Mar 5, 2020

Typescript requires that mixins have a single constructor which accepts a single spread parameter.

constructor(...args: any[]) {
  // ...
}

This means that even though all classes extending the dom.Value mixin are required to provide _ionAnnotations: string[] at construction time, we cannot statically enforce that it be passed in. We currently rely on subclasses calling this._setAnnotations in their constructor after invoking super(). If this requirement is ever relaxed, we should take advantage of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant