Skip to content

feat(framework): add createApp function (#3)#37

Merged
qantrepreneur merged 1 commit into
mainfrom
3-create-app
May 14, 2026
Merged

feat(framework): add createApp function (#3)#37
qantrepreneur merged 1 commit into
mainfrom
3-create-app

Conversation

@qantrepreneur
Copy link
Copy Markdown
Contributor

Summary

  • Add createApp function that accepts { context, onError } configuration
  • context receives a Request and returns user-defined context; the return type is preserved through the generic type parameter for downstream inference
  • onError is optional, receives (error: unknown, request: Request) and returns a Response
  • Export createApp and AppConfig from the package entry point

Test plan

  • createApp returns the config object unchanged (identity at runtime)
  • Works with onError handler provided
  • Works without onError (optional)
  • Type-level test: context return type is preserved via expectTypeOf
  • Type-level test: AppConfig generic preserves custom context type
  • pnpm --filter @sundayceo/framework test passes (14 tests)
  • pnpm --filter @sundayceo/framework check-types passes
  • pnpm lint passes
  • pnpm format passes

Closes #3

🤖 Generated with Claude Code

Implement the root configuration entry point that accepts context and
onError config. The context function's return type propagates through
the type system for downstream inference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@qantrepreneur qantrepreneur merged commit 5cc521c into main May 14, 2026
2 checks passed
@qantrepreneur qantrepreneur deleted the 3-create-app branch May 14, 2026 15:46
@github-actions github-actions Bot mentioned this pull request May 14, 2026
qantrepreneur added a commit that referenced this pull request May 21, 2026
Implement the root configuration entry point that accepts context and
onError config. The context function's return type propagates through
the type system for downstream inference.

Co-authored-by: Lorenzo <lorenzofkramer@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

createApp function with context and onError

1 participant