video-dev / video-dev/hls.js

no d.ts file for the /light version

Open
#7,574 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

light-build Revisit-at-later-release-cycle TypeScript
Dominant language
TypeScript
Stars
16.9k
Forks
2.8k
Avg merge
1d 12h
Merged PRs (30d)
27

Description

What version of Hls.js are you using?

1.6.13

What browser (including version) are you using?

firefox 143

What OS (including version) are you using?

macos tahoe

Test stream

No response

Configuration
not applicable
Additional player setup steps

No response

Checklist
Steps to reproduce
  1. make a blank typescript project
  2. install hls.js
  3. paste the following code
import Hls from 'hls.js/light';

Hls.isSupported()
Image
  1. and notice that isSupported is of type any and not type () => boolean
Expected behaviour
Image

as you can see, with the normal version, types work fine

What actually happened?
Image

it fails to find a declaration file, as the build script does not generate these files for the /light version

Image
Console output
not applicable
Chrome media internals output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the normal Hls.js entry point with the /light entry point and inspect the build script that generates declaration files. Verify how TypeScript resolves the normal import versus hls.js/light, then ensure the light version exposes the expected declarations and test the blank TypeScript project reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.