README mentions adding a tsconfig.json, but doesn't say what to put in it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- documentation
Research direction
Start by locating the README passage that mentions adding a tsconfig.json, then compare it with the proposed configuration and the example project. Document the needed compiler options, including the exclusions and inclusions shown, so the example project's generated .marko-run/routes.d.ts types work in VS Code without the reported TypeScript errors.
Written by the indexing model from the issue text.
Description
If I add a tsconfig.json, I need to put roughly the following in it:
{
"compilerOptions": {
"strict": true,
"lib": ["DOM", "DOM.Iterable", "ES6"],
"esModuleInterop": true,
"resolveJsonModule": true
},
"exclude": ["node_modules", "dist"],
"include": [".marko-run/routes.d.ts", "src"]
}
If I omit "lib", I'll get TS errors telling me that Promise isn't defined. (You can use something more aggressive than ES2019 if you're targeting modern browsers, but ES6 happens to be the minimum for Promise.)
If I omit either "esModuleInterop" or "resolveJsonModule", I see type errors in the example project, because the file generated in .marko-run/routes.d.ts isn't parsed by typescript, so none of my per-route types seem to be visible in VS Code.
I'm going to suggest adding an example tsconfig.json file?
edit: I thought these were needed but they actually aren't:
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
- Dominant language
- TypeScript
- Stars
- 175
- Forks
- 16
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from marko-js/run
-
DEP0190: spawnServer passes args array with shell:true, triggering Node v26 deprecation warningOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openedx/frontend-app-authoring#3274 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area/documentation status/need-triage
Difficulty 1/5 Under an hour Newbie friendliness 95/100
google-gemini/gemini-cli#29548 ·
Maintainers usually reply within 1 day
-
sdk-typescript vector-store
Difficulty 2/5 Half a day Newbie friendliness 82/100
mem0ai/mem0#7495 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day