·callback-this-type
</>

callback-this-type

Use when callbacks use this. Use when API provides this context. Use when typing event handlers. Use when library sets this in callbacks. Use when documenting callback context.

5Installs·0Trend·@marius-townhouse

Installation

$npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill callback-this-type

How to Install callback-this-type

Quickly install callback-this-type AI skill to your development environment via command line

  1. Open Terminal: Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.)
  2. Run Installation Command: Copy and run this command: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill callback-this-type
  3. Verify Installation: Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Source: marius-townhouse/effective-typescript-skills.

SKILL.md

View raw

Provide a Type for this in Callbacks if It's Part of Their API

When a library calls a user-provided callback with a specific this context, that context is part of the API. TypeScript allows you to type this as the first parameter of a function, even though it's not a real parameter. This documents and enforces the expected context.

Type this as the first parameter when it's part of your callback API. This documents the expected context and enables autocompletion.

Use when callbacks use this. Use when API provides this context. Use when typing event handlers. Use when library sets this in callbacks. Use when documenting callback context. Source: marius-townhouse/effective-typescript-skills.

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill callback-this-type
Category
</>Dev Tools
Verified
First Seen
2026-02-26
Updated
2026-03-10

Browse more skills from marius-townhouse/effective-typescript-skills

Quick answers

What is callback-this-type?

Use when callbacks use this. Use when API provides this context. Use when typing event handlers. Use when library sets this in callbacks. Use when documenting callback context. Source: marius-townhouse/effective-typescript-skills.

How do I install callback-this-type?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/marius-townhouse/effective-typescript-skills --skill callback-this-type Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw

Where is the source repository?

https://github.com/marius-townhouse/effective-typescript-skills