videojs/v10

Docs: Audit TypeScript vs JavaScript Consistency Across the Site

Open

#1,104 opened on Mar 24, 2026

 (2 comments) (0 reactions) (0 assignees)TypeScript (67 forks)github user discovery
docsgood first issueneeds discussionsite

Repository metrics

Stars
 (804 stars)
PR merge metrics
 (Avg merge 14d 19h) (55 merged PRs in 30d)

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.tsx renders the import tab as "JavaScript" with lang="javascript"
  • All 52 MDX reference/concept/how-to pages use ```ts code fences for HTML examples
  • All 19 demo file arrays use lang: 'ts' for their script files
  • The React installation flow uses tsx throughout

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?

Contributor guide