Skip to content

Publish TypeScript declaration files in the npm package #67

Description

@roflsunriz

Description

The npm package is written in TypeScript, but page-flip@2.0.7 does not appear to publish TypeScript declaration files or a types entry in package.json.

This means TypeScript consumers need to add their own ambient module declarations, even for the public API documented in the README.

Expected behavior

The package should publish .d.ts files and expose them through package.json, for example:

{
  "types": "dist/js/page-flip.d.ts"
}

or another generated declaration path.

Why this matters

Consumers using TypeScript currently cannot import the package without adding local declarations such as:

import { PageFlip } from "page-flip";

This is especially awkward because the source project itself is TypeScript and the public API is already typed internally.

Environment

  • package: page-flip
  • version: 2.0.7
  • TypeScript consumer project

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions