Skip to content

sdk: declarations fail under classic TypeScript module resolution #75

Description

@sweetcornna

What happened

The SDK exposes declarations only through conditional exports and lacks a top-level types fallback used by classic node or node10 TypeScript resolution.

Reproduction:

  1. Build the current SDK so dist/index.d.ts exists.
  2. Link it into an isolated consumer's node_modules.
  3. Import @dormice/sdk with TypeScript moduleResolution=node.
  4. Compare with Bundler resolution and with @dormice/shared under node resolution.

Expected: The documented bare package import should resolve its declarations, or the package should state a modern-resolution requirement.

Actual: TypeScript reports TS2307 and explicitly says the declaration exists but cannot be resolved under the configured mode. Bundler resolution succeeds, and the shared package succeeds because it provides top-level fallbacks.

Impact: Local or tarball TypeScript consumers using classic package resolution cannot import the queued SDK package. The package is not yet published, and classic resolution is deprecated in newer TypeScript, which narrows current scope.

dor doctor output

Not applicable — the finding is an isolated TypeScript declaration-resolution reproduction and does not involve a running daemon. dor doctor was not run.

Environment

  • Reproduction mode: Focused-source reproduction
  • Dormice commit: 4417ae14938273f5d937c476cf7cdc57e22e53a5
  • Compiler: TypeScript 5.9.3 and 6.0.3
  • Resolution modes: node, Bundler, and shared-package controls
  • Verification: Verified with TypeScript 5.9.3 and 6.0.3 against SDK main at 4417ae14938273f5d937c476cf7cdc57e22e53a5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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