-
Notifications
You must be signed in to change notification settings - Fork 141
chore(rivetkit): specialize context types for better compiler errors #3669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 12-22-fix_rivetkit_fix_c.client_not_respecting_correct_origin
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Pull Request Review: Specialize Context Types for Better Compiler ErrorsOverviewThis PR improves the developer experience by creating specialized context types for each lifecycle hook in RivetKit. This provides better type checking and more helpful compiler errors. ✅ Strengths1. Excellent Developer Experience ImprovementThe specialized context types make it much clearer which properties are available in each lifecycle hook:
2. Well-Organized Code StructureThe new directory structure is clean and logical:
3. Type Safety ImprovementsThe use of conditional types for optional properties is excellent: get state(): TState extends never ? never : TState {
return this.#actor.state as TState extends never ? never : TState;
}This prevents accessing 4. Consistent Naming Convention
|
4040925 to
b716026
Compare

No description provided.