在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用typescript
星标1
分支0
更新时间2026年2月1日 12:33
TypeScript with Zod validation, ESLint and Prettier
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
TypeScript with Zod validation, ESLint and Prettier
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Multi-provider LLM integration for phrase generation (Groq, OpenAI, Gemini, extensible)
Cycle ORM patterns, configuration and common pitfalls for Symfony integration
Docker with multi-stage builds, security best practices and Docker Compose
Symfony framework with PestPHP testing and Clean Architecture patterns
WCAG 2.2 AA compliance for SAAC applications
Symfony with Pest PHP testing framework and TDD patterns
| name | typescript |
| description | TypeScript with Zod validation, ESLint and Prettier |
| license | MIT |
| compatibility | opencode |
| metadata | {"type":"language","category":"superset"} |
src/types/ para definiciones de tipos globales, src/interfaces/ para contratos.typeError o validationError en context para logs específicos de TypeScript.// 1. Muestra el test fallando (RED)
// src/utils/calculator.spec.ts
import { describe, it, expect } from 'vitest';
import { add } from './calculator';
describe('add function', () => {
it('should add two numbers correctly', () => {
expect(add(1, 2)).toBe(3);
expect(add(0, 0)).toBe(0);
expect(add(-1, -1)).toBe(-2);
});
});
// 2. Validación de input con Type Guards y Zod
import { z } from 'zod';
interface UserProfile {
id: number;
username: string;
email: string;
isActive: boolean;
}
const UserProfileSchema = z.object({
id: z.number().int().positive(),
username: z.string().min(3),
email: z.string().email(),
isActive: z.boolean(),
});
function validateUserProfile(data: unknown): UserProfile {
try {
return UserProfileSchema.parse(data);
} catch (error) {
if (error instanceof z.ZodError) {
console.error("Validation failed for UserProfile:", error.errors);
throw new Error("Invalid User Profile Data.");
}
throw error;
}
}