AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Typescript Language

skill-cuonglph11-mini-chris-typescript-language · by cuonglph11

Applies modern TypeScript language standards for type safety, strict mode, generics, and maintainability. Use when editing or writing TypeScript/TSX, defining types, interfaces, enums, unions, generics, type guards, or working with tsconfig and strict typing.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-cuonglph11-mini-chris-typescript-language

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-cuonglph11-mini-chris-typescript-language)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Typescript Language? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

TypeScript Language Patterns

Priority: P0 (Critical)

Implementation Guidelines

  • Type annotations: Explicit params and return types; infer locals.
  • Interfaces vs types: interface for object shapes and APIs; type for unions, intersections, and aliases.
  • Strict mode: Use strict: true. Null safety: optional chaining ?. and nullish coalescing ??.
  • Enums: Prefer literal unions or as const; avoid runtime enum.
  • Generics: Use for reusable, type-safe code.
  • Type guards: Use typeof, instanceof, or user-defined type predicates.
  • Utility types: Use Partial, Pick, Omit, Record and custom utilities as needed.
  • Immutability: Prefer readonly arrays/objects; use const assertions as const and satisfies.
  • Template literal types: Use for patterns like on${Capitalize}.
  • Discriminated unions: Use a literal kind (or similar) property to discriminate.
  • Advanced: Mapped, conditional, and indexed access types when appropriate.
  • Access: Default public; use private/protected or #private when needed.
  • Branded types: Use for nominal typing, e.g. string & { __brand: 'Id' }.

Anti-Patterns

  • No any: Use unknown or specific types; never any.
  • No Function: Use concrete signatures, e.g. () => void.
  • No runtime enum: Use union types or as const to avoid runtime cost.
  • No non-null assertion !: Use proper narrowing instead.
  • No lint disables: Do not use eslint-disable or ts-ignore; fix issues properly.

Testing Patterns

  • Mock types: Use jest.Mocked or as unknown as T; never any.
  • Enums: Use enum values (e.g. AppointmentStatus.UPCOMING) not string literals where the type is an enum.
  • DTOs: Ensure test data includes all required fields expected by DTOs.
  • Repository mocks: Mock every repository method used by the code under test (findOne, create, save, findAndCount, createQueryBuilder, etc.).

Common Test Issues

| Problem | Solution | | --------------------------------- | ------------------------------------------------------------------------------------------ | | Service method name mismatch | Check implementation and mock the methods actually called. | | Error message mismatch | Use exact messages from shared constants (e.g. ErrorMessages). | | Mock missing required properties | Provide full mocks or use as unknown as Type for complex cases. | | CurrentUser incomplete in mocks | Include all required fields (id, email, subscriptionTier, createdAt, updatedAt). | | Auth/guard mocks failing | Provide complete service mocks (e.g. logger, userRepository) or cast via unknown. | | Wrong controller params | Match decorators (e.g. @CurrentUserDecorator()) and pass the correct types. |

Quick Reference

// Branded type
type UserId = string & { __brand: "Id" };

// satisfies: validate shape and infer
const cfg = { port: 3000 } satisfies Record;

// Discriminated union
type Result = { kind: "ok"; data: T } | { kind: "err"; error: Error };

Additional Resources

For advanced type patterns and utility types, see [reference.md](reference.md).

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.