Skip to content

Proposal: Integrate TypeScript Definitions into basic-auth #69

@Phillip9587

Description

@Phillip9587

Summary

Currently, TypeScript users of basic-auth rely on the external @types/basic-auth package for type definitions. To improve maintainability, developer experience, and ensure type definitions stay in sync with the library, this proposal suggests migrating the type definitions directly into the basic-auth package.

Benefits

  • Improved Maintainability: Type definitions will be updated alongside the core library, reducing the risk of outdated or mismatched types.
  • Better Developer Experience: Users won’t need to install an additional @types/basic-auth package.
  • Increased Adoption: Built-in types may encourage more developers to use the library with TypeScript.

Proposed Changes

  1. Add a index.d.ts file with the current type definitions from @types/basic-auth.
  2. Update package.json to include "types": "index.d.ts".
  3. Ensure types align with the latest API and are well-documented.
  4. Remove the need for @types/basic-auth and update documentation accordingly.
  5. Deprecate @types/basic-auth

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions