Skip to content
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

fix(start): ensure generic h3 functions remain generic, including new overloads #3285

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EskiMojo14
Copy link
Contributor

@EskiMojo14 EskiMojo14 commented Jan 30, 2025

previously, type parameters weren't being passed through to wrapper functions, meaning things like useSession<Data>(config) didn't work properly.

This PR ensures the original signature is kept intact, along with providing specifically typed overloads for wrappers that need it.

breaking changes:

  • getEvent returns H3Event, or throws an error if it couldn't find one. Previously it returned any, and didn't check whether event was truthy.

Copy link

nx-cloud bot commented Jan 30, 2025

View your CI Pipeline Execution ↗ for commit 39af8f3.

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 4m 10s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1m 20s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-30 21:29:54 UTC

@EskiMojo14 EskiMojo14 changed the title ensure generic h3 functions remain generic, including new overloads fix!: ensure generic h3 functions remain generic, including new overloads Jan 30, 2025
@EskiMojo14 EskiMojo14 changed the title fix!: ensure generic h3 functions remain generic, including new overloads fix(start)!: ensure generic h3 functions remain generic, including new overloads Jan 30, 2025
Copy link

pkg-pr-new bot commented Jan 30, 2025

Open in Stackblitz

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@3285

@tanstack/create-start

npm i https://pkg.pr.new/@tanstack/create-start@3285

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/@tanstack/directive-functions-plugin@3285

@tanstack/create-router

npm i https://pkg.pr.new/@tanstack/create-router@3285

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@3285

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@3285

@tanstack/react-cross-context

npm i https://pkg.pr.new/@tanstack/react-cross-context@3285

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@3285

@tanstack/react-router-with-query

npm i https://pkg.pr.new/@tanstack/react-router-with-query@3285

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@3285

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@3285

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@3285

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@3285

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@3285

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@3285

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/@tanstack/server-functions-plugin@3285

@tanstack/start

npm i https://pkg.pr.new/@tanstack/start@3285

@tanstack/start-api-routes

npm i https://pkg.pr.new/@tanstack/start-api-routes@3285

@tanstack/start-client

npm i https://pkg.pr.new/@tanstack/start-client@3285

@tanstack/start-config

npm i https://pkg.pr.new/@tanstack/start-config@3285

@tanstack/start-plugin

npm i https://pkg.pr.new/@tanstack/start-plugin@3285

@tanstack/start-router-manifest

npm i https://pkg.pr.new/@tanstack/start-router-manifest@3285

@tanstack/start-server

npm i https://pkg.pr.new/@tanstack/start-server@3285

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/@tanstack/start-server-functions-client@3285

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/@tanstack/start-server-functions-fetcher@3285

@tanstack/start-server-functions-handler

npm i https://pkg.pr.new/@tanstack/start-server-functions-handler@3285

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/@tanstack/start-server-functions-server@3285

@tanstack/start-server-functions-ssr

npm i https://pkg.pr.new/@tanstack/start-server-functions-ssr@3285

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@3285

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@3285

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@3285

commit: 39af8f3

@schiller-manuel
Copy link
Contributor

we should use those functions in the e2e test to ensure this still builds

@SeanCassiere SeanCassiere changed the title fix(start)!: ensure generic h3 functions remain generic, including new overloads fix(start): ensure generic h3 functions remain generic, including new overloads Jan 31, 2025
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.

2 participants