fix(templates): type-check event functions in a new project

Open Beginner friendly
#183 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bun, typescript

Research direction

Read the template tsconfig files and packages/create-relkit/src/create-capabilities.ts; compare them with scripts/railway-newcomer/project.ts and the commit “re-pin the minimal template digest” for the expected pattern. Add the event registry to the appropriate template files list and update the pinned digest, or confirm the issue’s alternative approach. Done when a project created from the template with an event function passes bun run typecheck.

Written by the indexing model from the issue text.

Description

bug good first issue

The templates' tsconfig.json lists .relkit/generated/route-module-checks.ts and
.relkit/generated/context-registry.d.ts under files, but not
.relkit/generated/event-registry.d.ts. In a project that defines an event function,
tsc --noEmit fails until you add the file by hand (the Railway newcomer test does this in
scripts/railway-newcomer/project.ts).

What to do

  • Add the event registry to the files list of the templates that can define events, or document why
    relkit add events should add it instead.
  • Template files are pinned by digest: re-pin it in packages/create-relkit/src/create-capabilities.ts
    (see the commit "re-pin the minimal template digest" for the pattern).

Done when a project created from the template and given an event function passes bun run typecheck.

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
2h 45m
Merged PRs (30d)
64

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rel-kit/relkit

All issues in rel-kit/relkit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.