microsoft / microsoft/TypeScript

[docs] Document the interaction between `Parameters` and the `this` parameter

Open
#41,072 0 comments 1 reaction 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

Code

type T = (this: Date, foo: string) => void;
type P = Parameters<T>;
//=> type P = [foo: string]

The this parameter is ignored. I could not find any documentation about this. I think the docs should mention that the this parameter is ignored by Parameters<>.

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

Locate the documentation for the TypeScript Parameters utility type and compare it with the provided example involving a this parameter. Done means the documentation explicitly states that the this parameter is ignored by Parameters, with the behavior shown by the example.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.