videojs/v10

Docs: Audit TypeScript vs JavaScript Consistency Across the Site

Open

#1.104 aberto em 24 de mar. de 2026

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (67 forks)github user discovery
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.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?

Guia do colaborador