Skip to content

Typescript errors when using @svar-ui/svelte-grid@^2.5.0Β #60

@numical

Description

@numical

Title

TypeScript errors with skipLibCheck: false – incorrect @wx/lib-state import and invalid index signatures


Body

Hi πŸ‘‹

I'm using @svar-ui/svelte-grid@^2.5.0 in a SvelteKit project with strict TypeScript settings ("skipLibCheck": false).

When compiling, TypeScript reports multiple errors originating from @svar-ui/grid-store type declarations:

1. Missing module: @wx/lib-state

Several .d.ts files import from:

import { Store, EventBus } from "@wx/lib-state";
import type { TID } from "@wx/lib-state";

However, @wx/lib-state does not appear to exist on the public npm registry.
The actual dependency in grid-store/package.json is @svar-ui/lib-state.

This results in errors such as:

Cannot find module '@wx/lib-state' or its corresponding type declarations.

2. Invalid index signature types

There are also TypeScript errors like:

An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type.

For example:

columns?: {
  [key: TID]: boolean;
};

If TID is defined as string | number, this causes strict TS to fail because index signatures cannot use a union type alias.


Reproduction

  • SvelteKit project
  • TypeScript strict mode
  • "skipLibCheck": false
  • Install @svar-ui/svelte-grid@^2.5.0

Run tsc β†’ errors originate from node_modules/@svar-ui/grid-store/dist/types.


Expected Behavior

  • Type declarations should compile cleanly under strict TypeScript.
  • Imports should reference @svar-ui/lib-state instead of @wx/lib-state.
  • Index signatures should use valid key types (e.g., Record<string, ...>).

Question

Are there plans to fix the type declarations in grid-store so that strict TypeScript projects can use the grid without enabling skipLibCheck?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions