Skip to content

Replace UNLOADED_LIBRARY cast with proper nullable type #5

@kyleboon

Description

@kyleboon

From README Roadmap — Code Quality / Type Safety

Replace the pragmatic UNLOADED_LIBRARY cast in app/store/store.ts with a proper nullable type (library: LibraryType | null) and add real if (!this.library) return; guards at the top of each action.

The current pattern is a type-assertion workaround: all actions assume library is loaded because the UI only renders them in that state, but there is no static guarantee. A proper refactor would surface missing guards as compile errors.

Source: README.md roadmap

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions