RawSkill is a TypeScript helper type used to define skill content before it is fully structured by the application.
It represents a partially constructed Skill, where some system-assigned metadata (level and levelOrder) is intentionally optional. This allows content to be authored cleanly while preserving strict typing for the final application state.
type RawSkill = Omit<Skill, "level" | "levelOrder"> &
Partial<Pick<Skill, "level" | "levelOrder">>;
RawSkill exists to separate content authoring from application logic.
Content authors should not need to manually assign:
level
levelOrder
These values are derived from context (e.g. which level a skill belongs to and its order within that level)
The application should still guarantee that final Skill objects are complete and valid
RawSkill enables this without weakening the Skill interface.
const level1SkillsData: RawSkill[] = [
{
id: 1,
title: "Confirming the Client’s Name and Relationship to the Pet",
description: "...",
aims: [...],
cases: [...],
},
];
RawSkill is a content-authoring type, not a runtime model.
Use Skill when: