microsoft / microsoft/TypeScript

Compiler "target" option capitalization in docs inconsistent with code and json schema

Open
#6,490 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Docs
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

https://github.com/Microsoft/TypeScript/wiki/Compiler-Options
says --target can take the value ES5 (uppercase).

Visual Studio Code warns about using the uppercase one in your tsconfig.json, presumably because it's following the schema.

The JSON schema for tsconfig.json also has it in lowercase, but the docs (https://github.com/Microsoft/TypeScript/wiki/tsconfig.json#details) refer you to the first page (which uses uppercase) for the values.


My guess at fixing the problem:

From the source it appears the value ought to be lowercase:
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/commandLineParser.ts#L221

I think the fix is to use lowercase in the docs (the first page).

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

Open the Compiler Options wiki page and compare its --target values with the tsconfig.json documentation, the JSON schema, and the referenced src/compiler/commandLineParser.ts entry. Update the documentation so the capitalization matches the schema and code, then check that the linked documentation no longer gives conflicting guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.