Version
2.6.7
Description
<style/styles> types styles as never, so every styles.foo is a TS2339. Binding the same block with a destructuring pattern gets the correct type. Concise and HTML syntax behave the same.
Reproduction
Each is a single tag, checked with npx mtc.
// FAILS: Property 'thing' does not exist on type 'never'.
div class=styles.thing
style/styles --
.thing { color: red; }
--
// PASSES
div class=thing
style/{ thing } --
.thing { color: red; }
--
// FAILS, same error — so it isn't a concise-syntax issue
<div class=styles.thing/>
<style/styles>
.thing { color: red; }
</style>
// Control: correctly errors, `missing` is not in the CSS
div class=missing
style/{ missing } --
.thing { color: red; }
--
Version
2.6.7
Description
<style/styles>typesstylesasnever, so everystyles.foois a TS2339. Binding the same block with a destructuring pattern gets the correct type. Concise and HTML syntax behave the same.Reproduction
Each is a single tag, checked with
npx mtc.