vuejs / vuejs/docs

Scoped slots + Typescript

Open
#993 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
3.2k
Forks
5k
Avg merge
14d 17h
Merged PRs (30d)
1

Description

I'm not sure if this is a documentation issue or a core issue, but I'd like to "pass through" types into scoped slots. For example, if I have a Table component that deals with, say, RemoteCollection<T>, which includes some metadata relevant to the table, but the Table itself doesn't care about T - it would be nice to expose this pass-through typing, so that when I do <Table :data="remoteCollection"><template #row="{row}">{{row.name}}</template></Table> the row.name template can be type checked against whatever type remoteCollection is.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the Vue 3 documentation sections covering scoped slots and TypeScript support. Determine whether pass-through typing is a documentation gap or a core capability request, and define the supported behavior and an example that confirms whether the slot's row type is inferred from the Table data prop.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.