بنقرة واحدة
typescript
TypeScript coding standards for this project. Use when writing or modifying TypeScript files.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
TypeScript coding standards for this project. Use when writing or modifying TypeScript files.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | typescript |
| description | TypeScript coding standards for this project. Use when writing or modifying TypeScript files. |
These are the TypeScript standards for this project. Follow them when writing or modifying any TypeScript code.
Use as const to preserve exact literal types and readonly. This is the one acceptable use of as since it tightens types rather than loosening them.
type Status = (typeof STATUS)[number].as const over manually writing literal union types when the source of truth is an array or object.satisfies when you need both exact literal types and structural validation.const STATUS = ["idle", "loading", "success", "error"] as const;
type Status = (typeof STATUS)[number];
const PLAN_LIMITS = {
free: { projects: 3, storage: 500 },
pro: { projects: 50, storage: 10_000 },
} as const satisfies Record<string, Record<string, number>>;
type Plan = keyof typeof PLAN_LIMITS;
Model variants explicitly so the compiler forces you to handle each case.
type, status, kind.if/switch on the discriminant, not by checking for optional field existence.switch with exhaustiveness checking when there are three or more variants. The linter enforces exhaustive switch statements.type Result =
| { status: "success"; data: Order }
| { status: "error"; error: string };
function handleResult(result: Result) {
switch (result.status) {
case "success":
return processOrder(result.data);
case "error":
return reportError(result.error);
}
}
React coding standards for this project. Use when writing or modifying React components, hooks, or route files.
Code refactor to improve implementation details, only use when explicitly requested by user.
Guides correct usage of the Rostra state management library (createStore, Store, useStore), including store scoping, selectors, optional access, prop-driven initialization, and typing. Use only when the user asks you to work with an existing rostra store or to implement a new one.
Use whenever the scope of your task touches the shopify package or its uses anywhere in the project.