as-const-satisfies
CommunityPreserve literal types with as const and satisfies.
Authorncaq
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Type-safe constants and config objects in TypeScript often lose literal precision, resulting in looser types and potential runtime errors. The as const pattern preserves literal types, and as const satisfies Type enables both literal retention and structural conformance.
Core Features & Use Cases
- Preserve literal types for constants and configuration objects using as const.
- Enforce type constraints while keeping exact literal values with as const satisfies Type.
- Use cases include fixed sets of statuses, configuration fields, and string unions.
Quick Start
Define a constants object and apply as const or as const satisfies Type to preserve literal types and enforce type relationships.
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: as-const-satisfies Download link: https://github.com/ncaq/konoka/archive/main.zip#as-const-satisfies 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.