CentreForDigitalHumanities / CentreForDigitalHumanities/Vue-lib

Fix UUList data typing

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
Vue
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

[This commit](https://github.com/CentreForDigitalHumanities/Vue-lib/pull/10/commits/cc9d2416966726238c051876f239c8385e699ae1) removed `outFile` (which is deprecated), so types are now dispersed in various individual type files. From what I could read online, this seems to be the preferred approach. However, this also breaks the typing of the `data` prop for the slots of UUList.

You can check this out for yourself in `uu-list.vue`. The data prop used to be properly typed, but now it's just `any[] | undefined`.

Image

Using `defineSlots()` is of no avail. The only solution I have found to 'work' is to type assertions in the consuming component, e.g. in DIAPP's GraphQLList:

Image

Needless to say that this should not be necessary, and the output of UUList should be properly typed again.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in uu-list.vue and compare its current slot data typing with the earlier version referenced by the linked commit. Read the dispersed individual type files and inspect the consuming DIAPP GraphQLList example to understand the expected inferred type. Done means UUList slot data is properly typed again without type assertions in consuming components.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.