Skip to content

fix: keep packed declarations self-contained #407

Closed

Description

@electrohyun

Description

The packed smocket declarations import types from socket.io and socket.io-client, but the root package intentionally ships with no runtime, peer, or optional dependencies. A clean TypeScript consumer that installs only the tarball fails with TS2307 and TS2882. The declarations should be self-contained while Socket.IO parity checks remain typecheck-only.

Reproduction

import type { ServerContract } from 'smocket';
import type { SharedWorkerHost } from 'smocket/shared-worker';

declare const server: ServerContract;
declare const host: SharedWorkerHost;
void server;
void host;

Install only the packed smocket tarball and TypeScript, then compile under NodeNext or Bundler with strict: true and skipLibCheck: false. Compilation reports missing socket.io and socket.io-client modules.

smocket version

0.5.1

Environment

Node 24.11.1, TypeScript 6.0.3, NodeNext and Bundler module resolution

Activity

  1. added this to the v1.0.0 milestone on Aug 26, 2026
  2. added
    bug
    on Aug 26, 2026
  3. moved this from Backlog to In progress in smocketon Aug 26, 2026
  4. moved this from In progress to Done in smocketon Aug 26, 2026
  5. self-assigned this
    on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions