Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Scoped `<style/name>` tag variable is typed `never`

Open
#581 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
css, typescript

Research direction

Start by running the supplied Marko snippets with npx mtc and inspect the language-server handling for <style/name> bindings. Compare the inferred type for styles.foo with the destructuring example and the missing control case. Done means valid CSS names no longer produce TS2339 while unknown names still error.

Written by the indexing model from the issue text.

Description

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; }
  --
Dominant language
TypeScript
Stars
44
Forks
12
Avg merge
1h 56m
Merged PRs (30d)
7

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from marko-js/language-server

All issues in marko-js/language-server

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.