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

Quoted property aren't correctly transpiled #68

Closed
tpluscode opened this issue Jan 27, 2017 · 0 comments
Closed

Quoted property aren't correctly transpiled #68

tpluscode opened this issue Jan 27, 2017 · 0 comments

Comments

@tpluscode
Copy link
Contributor

I have a TS property in quotes (not sure it's needed but works)

export class MyExample {
   readonly 'escaped': String = null;
}

Interestingly, the default value is not added to the Polymer output. Even more surprising is that readOnly is.

Also, when I add @notify annotation, twc throws:

\twc\src\parsers\JSParser.js:225
                    config.annotations = usedAnnotations;
                                       ^

TypeError: Cannot set property 'annotations' of undefined
    at \twc\src\parsers\JSParser.js:225:40
    at String.replace (native)
    at Module.JSParser [as constructor] (\twc\src\parsers\JSParser.js:41:294)
    at new Module (E:\Piskorz\AppData\Roaming\npm\node_modules\twc\src\PolymerModule.js:95:28)
    at DestroyableTransform._transform (\twc\src\index.js:56:36)
    at DestroyableTransform.Transform._read (\twc\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:159:10)
    at DestroyableTransform.Transform._write (\twc\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:147:83)
    at doWrite (\twc\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:347:64)
    at writeOrBuffer (\twc\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:336:5)
    at DestroyableTransform.Writable.write (\twc\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:274:11)
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