TypeScript Expert

AI Code Review for TypeScript

diffray understands TypeScript. Generics, strict mode, type guards β€” AI-powered review for type-safe applications.

Node.js18+
Deno1.x
Bun1.x
NestJS10.x
tRPC10+

Built for TypeScript Developers

AI agents that understand TypeScript's type system at a deep level.

Type Safety

Catch type errors, validate generics, and enforce strict mode patterns.

  • Strict null checks
  • Generic constraints
  • Type narrowing

Runtime Safety

Find issues that TypeScript compiler misses but cause runtime errors.

  • Type assertion abuse
  • Implicit any
  • Unsafe casts

Security

Detect security vulnerabilities in full-stack TypeScript applications.

  • Input validation
  • SQL injection
  • XSS prevention

Performance

Identify type-level performance issues and build optimization problems.

  • Complex types
  • Bundle impact
  • Tree shaking

Common TypeScript Issues We Catch

Type assertions (as any)
Bypasses type safety, runtime errors
Flags unsafe casts, suggests type guards
Missing null checks
Cannot read property of undefined
Validates strictNullChecks patterns
Implicit any in generics
Type information loss, bugs
Enforces explicit generic constraints
Unsafe type predicates
Incorrect type narrowing
Validates user-defined type guards

Custom Rules for Type Safety

Enforce your team's TypeScript standards. Ban unsafe patterns, require strict types, ensure consistency.

  • Ban 'as any' and unsafe type assertions
  • Require explicit return types on exports
  • Enforce branded types for IDs
  • Validate Zod/io-ts schema usage
.diffray/rules/typescript.yaml
rules:
  - id: ts_no_unsafe_any
    agent: bugs
    title: No unsafe type assertions
    description: Avoid 'as any' and prefer
      type guards or unknown
    importance: 9
    match:
      file_glob:
        - '**/*.ts'
        - '**/*.tsx'
    checklist:
      - No 'as any' assertions
      - Use type guards for narrowing
      - Prefer unknown over any
    tags:
      - typescript
      - type-safety
      - strict-mode

TypeScript FAQ

Build Type-Safe Apps

Join TypeScript teams using diffray for expert AI code review.

Strict mode validation
Generics checking
Type guard validation