Skip to main content

typescript

Write or review TypeScript and JavaScript, especially typed object construction, runtime boundaries, modules, async resources, package configuration, and tests.

소스 정보

저장소
ilude/dotfiles
최근 소스 활동
2026년 9월 12일 02:22
감지된 SKILL.md 언어
영어
스타
4
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
typescript
description
Write or review TypeScript and JavaScript, especially typed object construction, runtime boundaries, modules, async resources, package configuration, and tests.
# TypeScript and JavaScript Identify the owning package from its manifest, lockfile, scripts, and compiler configuration. Use its configured package manager, module format, formatter, linter, typecheck, and test runner. ## Type safety - Do not use `any` when `unknown`, a generic, or a specific type works. Narrow `unknown` before use. - Do not use a type assertion merely to silence an error. Assertions neither validate nor transform values. - Prefer a typed declaration over an object-literal assertion. Use `satisfies` when checking an object while preserving its inferred type. - At RPC, serialization, persistence, subprocess, and public API boundaries, explicitly construct the boundary type. Do not spread a broader internal object and assert it to a narrower type. ```ts // Checks and transmits only the declared contract. const request: Request = { id: input.id, prompt, }; ``` ## Runtime boundaries - Static types disappear at runtime. Validate untrusted files, environment values, decoded JSON, and network responses. - Keep runtime dependencies separate from serializable data. Treat serialized shape as an explicit contract and test which fields cross it. - Preserve public types, serialization, and error behavior unless the request changes that contract. ## Modules and resources - Preserve the package's ESM/CJS mode, exports, runtime resolution, and supported import paths. Test the actual entry path when these change. - Keep exports minimal and avoid mutable exported state. - Make ownership and cleanup explicit for processes, sockets, timers, subscriptions, file handles, and temporary state. Use `finally` or the package's teardown mechanism. - Keep dependency and external failures visible. Do not hide them with broad catches or silent fallbacks. ## Checks - Read test scripts before passing filters or options. - Run the smallest configured typecheck and focused tests that can falsify the change. - Test observable behavior at the relevant runtime boundary. A typecheck alone does not prove validation, serialization, module resolution, or cleanup behavior.
GitHub에서 보기