Skip to content

Published declarations contain .ts extension specifiers #18

Description

@beogip

The published dist/*.d.ts files reference sources with literal .ts extensions (e.g. dist/index.d.ts: export { parseArgs, validateInput } from "./args.ts";). The tarball ships args.d.ts, not args.ts. tsc resolves this today by stripping the extension, but @arethetypeswrong/cli and stricter resolvers (bundler/nodenext with literal resolution) will flag it as broken types.

Root cause: allowImportingTsExtensions: true (tsconfig.json:6) + barrel re-exports in src/index.ts using .ts extensions, which tsc --emitDeclarationOnly copies verbatim into declarations.

Fix options: drop .ts from the barrel specifiers, or post-process declarations to rewrite extensions.

Suggested guard: add @arethetypeswrong/cli (attw --pack) as a CI gate so this cannot regress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1RecomendadoclaudeTrigger Claude Code to implement this issuepre-launchParte del checklist para anunciar/hacer publicoreleased

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions