Cocos ts compile check sop
Skill ChrisLamDev/cocos-creator-debug-skills/skills/cocos-ts-compile-check-sop
17 executable AI agent skills for Cocos Creator 3.x debugging
npx -y skills add ChrisLamDev/cocos-creator-debug-skills --skill cocos-ts-compile-check-sopAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when running TypeScript compile check on Cocos Creator 3.x project.
SKILL.md
1.2 KB, 236 tokens by cl100k_base, as published. Nobody here has run it
Cocos Creator TS Compile Check SOP
Mandatory TypeScript compile check before committing code to a Cocos Creator 3.x project.
Command
npx tsc --noEmit
Must pass with zero errors before any commit.
Common Errors & Fixes
| Error | Fix |
|---|---|
Cannot find module 'cc' | Add @cocos/creator-types to tsconfig |
Property 'xxx' does not exist | Check Cocos API version compatibility |
Type 'X' is not assignable | Check Cocos 3.x type differences from 2.x |
tsconfig.json Checklist
-
compilerOptions.target:"ES2015"or higher -
compilerOptions.module:"commonjs"or"ES2015" -
compilerOptions.strict:truerecommended -
compilerOptions.skipLibCheck:truefor faster checks -
include: covers allassets/**/*.ts
See references/tsconfig-template.md for a complete working tsconfig.json.