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

npm run build throws an error #1

Open
bahrus opened this issue Dec 16, 2018 · 2 comments
Open

npm run build throws an error #1

bahrus opened this issue Dec 16, 2018 · 2 comments

Comments

@bahrus
Copy link

bahrus commented Dec 16, 2018

I have typescript 3.2.2. When I run npm run build, I get the following error from twsc

AttributeTemplatePart.ts:89:7 - error TS2380: 'get' and 'set' accessor must have the same type.

89 get value(): string {
~~~~~

AttributeTemplatePart.ts:93:7 - error TS2380: 'get' and 'set' accessor must have the same type.

93 set value(value: string | null) {
~~~~~

@Jamesernator
Copy link
Owner

I am aware of this but the proto-spec seems to allow this (which TypeScript simply doesn't allow):

// Will delete the attribute if it's fully templatized
attributeTemplatePart.value = null

Also note the version in this repository is actually slightly different to the zipped version I posted in this comment, implementing my suggested changes.

In particular the concept of a node template part list is gone and is simply replaced with an anchor tag that keeps track of its own siblings. Additionally "InnerTemplatePart" is no longer a subclass of NodeTemplatePart as some of the properties on NodeTemplatePart didn't make sense for InnerTemplatePart.

Also no global registry of template processors in this version, either (the other has it).

@bahrus
Copy link
Author

bahrus commented Dec 17, 2018

Thanks for the explanation. I created a pull request in case you find it helpful. Feel free to discard, and close.

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