{
  "schemaVersion": "1.0",
  "item": {
    "slug": "typescript",
    "name": "TypeScript",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivangdavila/typescript",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/typescript",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/typescript",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=typescript",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "declarations.md",
      "generics.md",
      "migration.md",
      "utility-types.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/typescript"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/typescript",
    "agentPageUrl": "https://openagent3.xyz/skills/typescript/agent",
    "manifestUrl": "https://openagent3.xyz/skills/typescript/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/typescript/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "When to Use",
        "body": "User needs TypeScript expertise — from basic typing to advanced generics. Agent handles type narrowing, inference, discriminated unions, and strict mode patterns."
      },
      {
        "title": "Quick Reference",
        "body": "TopicFileGeneric patternsgenerics.mdUtility typesutility-types.mdDeclaration filesdeclarations.mdMigration from JSmigration.md"
      },
      {
        "title": "Stop Using any",
        "body": "unknown forces you to narrow before use — any silently breaks type safety\nAPI responses: type them or use unknown, never any\nWhen you don't know the type, that's unknown, not any"
      },
      {
        "title": "Narrowing Failures",
        "body": "filter(Boolean) doesn't narrow — use .filter((x): x is T => Boolean(x))\nObject.keys(obj) returns string[], not keyof typeof obj — intentional, objects can have extra keys\nArray.isArray() narrows to any[] — may need assertion for element type\nin operator narrows but only if property is in exactly one branch of union"
      },
      {
        "title": "Literal Type Traps",
        "body": "let x = \"hello\" is string — use const or as const for literal type\nObject properties widen: { status: \"ok\" } has status: string — use as const or type annotation\nFunction return types widen — annotate explicitly for literal returns"
      },
      {
        "title": "Inference Limits",
        "body": "Callbacks lose inference in some array methods — annotate parameter when TS guesses wrong\nGeneric functions need usage to infer — fn<T>() can't infer, pass a value or annotate\nNested generics often fail — break into steps with explicit types"
      },
      {
        "title": "Discriminated Unions",
        "body": "Add a literal type or kind field to each variant — enables exhaustive switch\nExhaustive check: default: const _never: never = x — compile error if case missed\nDon't mix discriminated with optional properties — breaks narrowing"
      },
      {
        "title": "satisfies vs Type Annotation",
        "body": "const x: Type = val widens to Type — loses literal info\nconst x = val satisfies Type keeps literal, checks compatibility — prefer for config objects"
      },
      {
        "title": "Strict Null Handling",
        "body": "Optional chaining ?. returns undefined, not null — matters for APIs expecting null\n?? only catches null/undefined — || catches all falsy including 0 and \"\"\nNon-null ! should be last resort — prefer narrowing or early return"
      },
      {
        "title": "Module Boundaries",
        "body": "import type for type-only imports — stripped at runtime, avoids bundler issues\nRe-exporting types: export type { X } — prevents accidental runtime dependency\n.d.ts augmentation: use declare module with exact module path"
      }
    ],
    "body": "When to Use\n\nUser needs TypeScript expertise — from basic typing to advanced generics. Agent handles type narrowing, inference, discriminated unions, and strict mode patterns.\n\nQuick Reference\nTopic\tFile\nGeneric patterns\tgenerics.md\nUtility types\tutility-types.md\nDeclaration files\tdeclarations.md\nMigration from JS\tmigration.md\nStop Using any\nunknown forces you to narrow before use — any silently breaks type safety\nAPI responses: type them or use unknown, never any\nWhen you don't know the type, that's unknown, not any\nNarrowing Failures\nfilter(Boolean) doesn't narrow — use .filter((x): x is T => Boolean(x))\nObject.keys(obj) returns string[], not keyof typeof obj — intentional, objects can have extra keys\nArray.isArray() narrows to any[] — may need assertion for element type\nin operator narrows but only if property is in exactly one branch of union\nLiteral Type Traps\nlet x = \"hello\" is string — use const or as const for literal type\nObject properties widen: { status: \"ok\" } has status: string — use as const or type annotation\nFunction return types widen — annotate explicitly for literal returns\nInference Limits\nCallbacks lose inference in some array methods — annotate parameter when TS guesses wrong\nGeneric functions need usage to infer — fn<T>() can't infer, pass a value or annotate\nNested generics often fail — break into steps with explicit types\nDiscriminated Unions\nAdd a literal type or kind field to each variant — enables exhaustive switch\nExhaustive check: default: const _never: never = x — compile error if case missed\nDon't mix discriminated with optional properties — breaks narrowing\nsatisfies vs Type Annotation\nconst x: Type = val widens to Type — loses literal info\nconst x = val satisfies Type keeps literal, checks compatibility — prefer for config objects\nStrict Null Handling\nOptional chaining ?. returns undefined, not null — matters for APIs expecting null\n?? only catches null/undefined — || catches all falsy including 0 and \"\"\nNon-null ! should be last resort — prefer narrowing or early return\nModule Boundaries\nimport type for type-only imports — stripped at runtime, avoids bundler issues\nRe-exporting types: export type { X } — prevents accidental runtime dependency\n.d.ts augmentation: use declare module with exact module path"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/typescript",
    "publisherUrl": "https://clawhub.ai/ivangdavila/typescript",
    "owner": "ivangdavila",
    "version": "1.0.2",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/typescript",
    "downloadUrl": "https://openagent3.xyz/downloads/typescript",
    "agentUrl": "https://openagent3.xyz/skills/typescript/agent",
    "manifestUrl": "https://openagent3.xyz/skills/typescript/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/typescript/agent.md"
  }
}