Open
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
4.35.1
Current Behavior
When using accessors for a @Prop()
decorated property in a Stencil component, the setter is not properly invoked after hydration (attribute -> property) if the getter uses a specific return type that differs from the setter helper property. This results in the internal state never updating with the hydrated or passed-in attribute value.
So it fails when getter and helper type are equal, without any
or piped any
.
Demo attached
Expected Behavior
Setter is called after hydration when reading @Prop
attribute
without the need of any any
type or additional any
piping (like Test | any
)
System Info
System: node 20.17.0
Platform: darwin (24.5.0)
CPU Model: Apple M2 Pro (12 cpus)
Compiler: /stenciljs-bug-accessor-attribute/bug-accessor-attribute/node_modules/@stencil/core/compiler/stencil.js
Build: 1750123236
Stencil: 4.35.1 🦄
TypeScript: 5.5.4
Rollup: 4.34.9
Parse5: 7.2.1
jQuery: 4.0.0-pre
Terser: 5.37.0
Steps to Reproduce
👇
Code Reproduction URL
Additional Information
No response