Hydrolysis errors if using ES6 classes #35
Comments
Had the same error trying to fix the documentation and demo of the paper-dropdown-menu component |
+1. Though I'm using a slightly different syntax, the one outlined in this article - I'm not sure if that makes a difference to the parser. |
Yea, I wouldn't use the syntax in #35 (comment). |
I'm declaring properties in beforeRegister() but still seeing this error. Anyone got this working? |
Is there any update on this? Did the ES6 PR attempt to resolve? I'm using ES6 in all my components and would love to be able to auto-generate docs, are there any examples / docs of ES6 syntax that is supported by hydrolysis? |
The ES6 PR didn't solve this issue. I have the same error as @robdodson mentioned above: This error is only a symptom, not the source of the issue, a quick fix silences the error but still the component page won't show. Here's the sample code which fails: class Foo {
beforeRegister() {
this.is = 'foo';
this.properties = {
cover: String,
photo: String,
username: String
};
}
}
Polymer(Foo); Compiling the ES6 code through Babel doesn't help at all. Still fails, for the same reason. |
I fixed it in my fork. |
Any ETA or a roadmap for when ES6 class parsing will be natively supported by Hydrolysis, perhaps a PR from @jgautheron 's fork to get this going? |
Just sent a PR: |
You should declare them in |
and for listeners, this should work?
|
Listeners are not shown in the
|
Hey guys, any traction on this yet? |
I'm moving this bug to hydrolysis |
Does this actually work now? If so, would someone please post an example. I've been trying to get it to work not realising it's a bug: the /demo/ and /test/ routes in polyserve work, the documentation page however doesn't. |
@mbana this bug is closed. You can continue the discussion at: https://github.com/Polymer/hydrolysis/issues/221 |
I recently tried using an ES6 class for my element's definition and saw the following hydrolysis error when viewing the docs.
I'm wondering if this PR should fix the issue or if it still requires more work. cc @garlicnation
Element definition is here if you want to repro:
The text was updated successfully, but these errors were encountered: