videojs/v10
Ver no GitHubDocs: Audit TypeScript vs JavaScript Consistency Across the Site
Open
#1.104 aberto em 24 de mar. de 2026
docsgood first issueneeds discussionsite
Métricas do repositório
- Stars
- (804 stars)
- Métricas de merge de PR
- (Métricas PR pendentes)
Description
Problem
The HTML installation page uses JavaScript (lang="javascript") for its import code block, while the rest of the documentation site consistently uses TypeScript (ts/tsx).
Specifically:
HTMLUsageCodeBlock.tsxrenders the import tab as "JavaScript" withlang="javascript"- All 52 MDX reference/concept/how-to pages use
```tscode fences for HTML examples - All 19 demo file arrays use
lang: 'ts'for their script files - The React installation flow uses
tsxthroughout
This means a user following the HTML getting-started path sees JavaScript first, then TypeScript everywhere else.
Scope
The inconsistency appears isolated to one component:
site/src/components/installation/HTMLUsageCodeBlock.tsx(line 145: tab label "JavaScript", line 150:lang="javascript")
Questions to answer
- Should the installation page switch to TypeScript to match the rest of the docs?
- Or should we offer both JS and TS variants across the site?
- If TS-only, do we need a note for JS-only users about stripping types?