Skip to content

Add TypeScript type definitions#41

Open
ingadi wants to merge 1 commit intofarshed:masterfrom
ingadi:add-types
Open

Add TypeScript type definitions#41
ingadi wants to merge 1 commit intofarshed:masterfrom
ingadi:add-types

Conversation

@ingadi
Copy link
Copy Markdown

@ingadi ingadi commented May 26, 2024

Description
This pull request adds TypeScript type definitions enabling full type safety and autocompletion features when using this library in TypeScript projects.

Changes made

  1. Added index.d.ts:
  • Created type definitions for all exported functions and interfaces
  1. Type definitions:
    Interfaces:
  • Options
  • GetSongByIdOptions
  • Song

Functions:

  • getLyrics
  • getSong
  • searchSong
  • getSongById
  • getAlbumArt
  1. Updated package.json:
  • Added "types": "index.d.ts" to enable TypeScript support.

Testing:

  • Verified type definitions in a local TypeScript project.

Conclusion:
These additions enhance the library's usability for TypeScript developers.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant