microsoft / microsoft/TypeScript
Compiler "target" option capitalization in docs inconsistent with code and json schema
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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