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

options first in pod constructor #10

Open
jonyrock opened this issue Dec 27, 2020 · 2 comments
Open

options first in pod constructor #10

jonyrock opened this issue Dec 27, 2020 · 2 comments

Comments

@jonyrock
Copy link
Contributor

I believe that options should be first in the constructor here

abstract class ChartwerkPod<T extends TimeSerie, O extends Options> {
  // ...

  constructor(
    // maybe it's not the best idea
    _d3: typeof d3,
    protected readonly el: HTMLElement,
    protected readonly series: T[] = [],
    _options: O
  ) {
@jonyrock
Copy link
Contributor Author

@rozetko please say what do you think

@rozetko
Copy link
Member

rozetko commented Dec 28, 2020

Not sure, because a pod can't render anything without el and series but can without options. I'd just make it optional (don't now why it's not)

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

2 participants