type-safe-monkey-patching
CommunityType-safe monkey-patching for globals
Software Engineering#typescript#web-development#type-safety#dom-manipulation#monkey-patching#interface-augmentation#global-objects
Authorluyi985
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Monkey patching built-in objects at runtime often breaks TypeScript type safety. This guide shows how to model runtime modifications with type-safe techniques instead of casting to any.
Core Features & Use Cases
- Interface augmentation for global properties like Window and Document
- Safe patterns for attaching data to DOM elements and DOM-related globals
- Alternatives for global state management and per-element data without sacrificing type safety
- Guidance for migrating legacy code from unsafe monkey patching to structured approaches
Quick Start
Augment the global Window type with a defined interface and assign typed values safely.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: type-safe-monkey-patching Download link: https://github.com/luyi985/lyi-bash/archive/main.zip#type-safe-monkey-patching Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.