Skip to content

The type inferences for hubDatabase and hubKV methods are gone #166

@ra-jeev

Description

@ra-jeev

Describe the bug
Intellisense is not working for methods of hubDatabase and hubKV. Methods show up as type any.

Steps to reproduce

  1. Start with the latest starter template (with @nuxthub/core v0.6.14)
  2. Open the project in VSCode
  3. Go to the existing server api/routes and try to check the types of hubDatabase or hubKV methods; they show up as type any
  4. No such issue for hubBlob (as HubBlob type is defined in the same file)

Expected behavior
The correct method signature should be displayed.

Possible Cause

HubKV and HubDatabase types are being imported from individual files instead of the index file. E.g.
Current:

import type { HubKV } from '../../../../types/kv.js';

Should be:

import type { HubKV } from '../../../../types';

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions