pymodel/react-frontend-skills

typescript

Current TypeScript guidance, including TypeScript 7 migration, tsconfig design, type errors, declaration performance, async patterns, module organization, and runtime type safety.

查看源码
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

TypeScript Best Practices

Comprehensive TypeScript 7-compatible guide with 44 rules across 8 categories, covering compiler configuration, type-system performance, async code, modules, safety, and measured runtime optimization.

When to Apply

Reference these guidelines when:

  • Configuring tsconfig.json for a new or existing project
  • Writing complex type definitions or generics
  • Optimizing async/await patterns and data fetching
  • Organizing modules and managing imports
  • Reviewing code for compilation or runtime performance

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Type System PerformanceCRITICALtype-
2Compiler ConfigurationCRITICALtscfg-
3Async PatternsHIGHasync-
4Module OrganizationHIGHmodule-
5Type Safety PatternsMEDIUM-HIGHsafety-
6Memory ManagementMEDIUMmem-
7Runtime OptimizationLOW-MEDIUMruntime-
8Advanced PatternsLOWadvanced-

Table of Contents

  1. Type System Performance — CRITICAL
  1. Compiler Configuration — CRITICAL
  1. Async Patterns — HIGH
  1. Module Organization — HIGH
  1. Type Safety Patterns — MEDIUM-HIGH
  1. Memory Management — MEDIUM
  1. Runtime Optimization — LOW-MEDIUM
  1. Advanced Patterns — LOW

References

  1. https://github.com/microsoft/TypeScript/wiki/Performance
  2. https://www.typescriptlang.org/docs/handbook/
  3. https://v8.dev/blog
  4. https://nodejs.org/en/learn/diagnostics/memory
来自同一仓库

更多 Skills

全部 Skills
pymodel
社区

feature-arch

React feature-based architecture guidelines for scalable applications (formerly feature-architecture). This skill should be used when writing, reviewing, or refactoring React code to ensure proper feature organization. Triggers on tasks involving project structure, feature organization, module boundaries, cross-feature imports, data fetching patterns, or component composition.

安装量
2
GitHub Stars
3
最近更新
8月21日
pymodel
社区

msw

Current MSW v2 guidance for request handlers, Node/browser setup, HTTP and GraphQL mocking, test isolation, timing, and debugging. General test framework patterns are covered by vitest and methodology by tdd.

安装量
2
GitHub Stars
3
最近更新
8月21日
pymodel
社区

nextjs

Current Next.js 16 App Router guidance for caching, Cache Components, Server Components, routing, Server Actions, and next.config.js. Use for Next.js 16.x code. Generic React 19 patterns are covered by the react skill.

安装量
2
GitHub Stars
3
最近更新
8月21日
pymodel
社区

nuqs

nuqs (type-safe URL query state) best practices for Next.js applications. This skill should be used when writing, reviewing, or refactoring code that uses nuqs for URL state management. Triggers on tasks involving useQueryState, useQueryStates, search params, URL state, query parameters, nuqs parsers, or Next.js routing with state.

安装量
2
GitHub Stars
3
最近更新
8月21日