microsoft / microsoft/TypeScript-Website

`declare global` is not explained anywhere

Open
#3,409 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.6k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
7

Description

Page URL: https://www.typescriptlang.org/docs/handbook/declaration-files/by-example.html

Issue: It doesn't explain what declare global is, how to use it, how it works, and when and why you should use it.

I think this is the most appropriate place to explain this, but I am not even sure about that. Maybe it might fit somewhere else, I don't really know.

This construct is mentioned here, but only as an example and doesn't really get into details about its mechanics.

Contributor guide

No contributing guide indexed for this repository

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

Start with docs/handbook/declaration-files/by-example.html, then compare the existing discussion in docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html. Document what declare global is, how and when to use it, why it is needed, and how its mechanics work; done means the relevant handbook page answers those questions clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.