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

bug: Can't execute a custom decorator after @Prop decorator #4629

Closed
3 tasks done
luenmuvel opened this issue Jul 27, 2023 · 1 comment
Closed
3 tasks done

bug: Can't execute a custom decorator after @Prop decorator #4629

luenmuvel opened this issue Jul 27, 2023 · 1 comment
Labels

Comments

@luenmuvel
Copy link

Prerequisites

Stencil Version

4.0.0

Current Behavior

It is not possible to add a custom decorator after the @prop decorator. Calling to "Custom Decorator" is cancelled for some reason. When I use the same Custom Decorator without the @prop decorator it does run:

@Prop() CustomDecorator() myProp;

This doesn't work. But this one does:

CustomDecorator()
Another()
Other()
myProp;

Expected Behavior

I would like to be able to work with custom decorators that allow me to perform certain actions before assigning the value to the property, like so:

@Prop() ParsingData() MyProperty;

In this way, it could execute actions depending on the type of information it receives, before assigning the value to the property "MyProperty"

System Info

System: node 16.19.0
    Platform: windows (10.0.19045)
   CPU Model: 12th Gen Intel(R) Core(TM) i7-1265U (12 cpus)
    Compiler: C:\Users\T05656\Pruebas\pruebas\testcomponents\node_modules\@stencil\core\compiler\stencil.js
       Build: 1690208707
     Stencil: 4.0.2
  TypeScript: 5.0.4
      Rollup: 2.42.3
      Parse5: 7.1.2
      Sizzle: 2.42.3
      Terser: 5.19.1

Steps to Reproduce

You just need to create a property decorator and add it as the second decorator of your property in your Stencil component.

Code Reproduction URL

git@github.com:luenmuvel/stencil-decorators.git

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jul 27, 2023
@alicewriteswrongs
Copy link
Contributor

Hey @luenmuvel, sorry you're running into this issue. I believe this is a duplicate of #3831 which is already on our radar - we have plans to fix this and to enable Stencil users to write with custom decorators. Accordingly I'm going to close this, but not because I don't think it's important!

Thanks for filing 🙂

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

No branches or pull requests

2 participants