- Home
- Skills
- Joncrangle
- .Dotfiles
- Lang Typescript
lang-typescript_skill
- TypeScript
8
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill joncrangle/.dotfiles --skill lang-typescript- SKILL.md5.9 KB
Overview
This skill provides targeted TypeScript 5.9+ guidance and code patterns for SolidJS, TanStack Start, and Valibot-based validation. It helps write, debug, and configure .ts/.tsx files, create Solid components, wire TanStack routes/server functions, and craft type-safe validation schemas. Use it to enforce strict typing, reusable patterns, and predictable builds in modern TypeScript apps.
How this skill works
The skill inspects file extensions (.ts, .tsx, .mts, .cts), tsconfig and lint configs, and project scripts (justfile, package scripts) to align changes with project conventions. It suggests code that avoids forbidden patterns (no any, no enums, no default exports, no non-null assertions, no @ts-ignore) and uses SolidJS primitives, TanStack Start routing/server-function patterns, and Valibot schemas. It recommends running tsc --noEmit, bun/vitest tests, and lint checks after edits.
When to use it
- When asked to write or refactor TypeScript (.ts/.tsx/.mts/.cts) files
- When creating or debugging SolidJS components or patterns (signals, stores, resources)
- When configuring TanStack Start file-based routes, loaders, or server functions
- When validating or generating Valibot schemas and type-safe parsers
- When running type checks, linting, or test commands in a TypeScript project
Best practices
- Prefer named exports; avoid default exports for consistency and tree-shaking
- Never use any; use unknown or explicit types and narrow with type guards
- Avoid enum and non-null assertions; use union types and optional chaining/nullish coalescing
- Use tsconfig.json and eslint config to match project conventions; run tsc --noEmit after changes
- Match file extension to content: .tsx for JSX, .ts for plain logic; ensure created files follow project layout
Example use cases
- Create a SolidJS component using createSignal, createMemo, and <For> with strict props types
- Add a TanStack Start route with a server function and useLoaderData type-safe loader
- Write Valibot schema for an API payload and derive TypeScript types without any
- Refactor a module to remove enums and any, replace with union types and type guards
- Diagnose type errors by inspecting tsconfig, running tsc --noEmit, and updating types to satisfy the compiler
FAQ
No. This skill enforces avoiding any and @ts-ignore. Use unknown and proper narrowing, or @ts-expect-error only when intentionally testing error scenarios.
How should I handle nullable values instead of ! non-null assertions?
Use optional chaining (?.), nullish coalescing (??), explicit runtime checks, or refine types with type guards to handle null/undefined safely.