javascript-typescript

Implements JavaScript and TypeScript patterns for ES6+, Node.js, and React development.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/macintorsten/aurapod --skill javascript-typescript-macintorsten
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: javascript-typescript
Source: https://github.com/macintorsten/aurapod/tree/main/.github/skills/javascript-typescript
Command: npx skills add https://github.com/macintorsten/aurapod --skill javascript-typescript-macintorsten

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working on JavaScript and TypeScript projects often need consistent, modern code patterns for type safety, React components, and Node.js backends without repeatedly looking up syntax and best practices. ## Core Features & Use Cases - TypeScript Configuration & Type Patterns: Provides a strict tsconfig baseline plus utility types, discriminated unions, and generic constraints for type-safe code. - Modern JavaScript Idioms: Covers destructuring, spread, optional chaining, nullish coalescing, and array methods for ES6+ development. - React & Node.js Patterns: Includes typed component props, custom hooks like useLocalStorage, ES module imports, and process-level error handling. - Use Case: When building a full-stack TypeScript app, use this Skill to generate a strictly typed Result<T> error-handling pattern and a reusable custom React hook without consulting documentation. ## Quick Start Write a TypeScript custom React hook with proper generics and strict typing for managing form state.

Frequently Asked Questions about javascript-typescript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a discriminated union type in TypeScript?▼

Define a union of object types sharing a literal tag field, such as Result<T> with success: true or success: false variants. TypeScript narrows the type automatically when you check the tag, giving safe access to variant-specific properties.

How to create a custom React hook with TypeScript generics?▼

Declare a generic function like useLocalStorage<T> that accepts a key and initial value, then use useState<T> and useEffect for persistence. Returning the state tuple as const preserves precise typing for consumers.

What tsconfig settings enable strict TypeScript checking?▼

Enable strict, noUncheckedIndexedAccess, and noImplicitOverride in compilerOptions, with target ES2022 and moduleResolution bundler. These flags catch undefined index access and missing override modifiers at compile time.

Does optional chaining work with nullish coalescing in JavaScript?▼

Yes, optional chaining (?.) safely accesses nested properties while nullish coalescing (??) provides defaults only for null or undefined. Combined as user?.address?.city ?? 'Unknown', they avoid both runtime errors and falsey-value bugs.

When should I use utility types like Pick and Omit?▼

Use Pick to derive a type with selected properties, such as a UserPreview, and Omit to exclude fields like id when creating new entities. They keep derived types synchronized with the source interface automatically.