Files
SnowLuma/.pnpm-store/v11/files/39/efc33109e9ef4c6b6803c4d16f60b6e9cc3d94380984a119047a912874fbf8b05a9769ad69545819ae9a53a1f65f1e0a83540284a85a2124675ac4013c4c0e
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

27 lines
858 B
Plaintext

import { Env, Schema } from "../../types.js";
import { Hono } from "../../hono.js";
import { HandleOptions, handle } from "./handler.js";
//#region src/adapter/service-worker/index.d.ts
/**
* Registers a Hono app to handle fetch events in a service worker.
* This sets up `addEventListener('fetch', handle(app, options))` for the provided app.
*
* @param app - The Hono application instance
* @param options - Options for handling requests (fetch defaults to undefined)
* @example
* ```ts
* import { Hono } from 'hono'
* import { fire } from 'hono/service-worker'
*
* const app = new Hono()
*
* app.get('/', (c) => c.text('Hi'))
*
* fire(app)
* ```
*/
declare const fire: <E extends Env, S extends Schema, BasePath extends string>(app: Hono<E, S, BasePath>, options?: HandleOptions) => void;
//#endregion
export { fire, handle };
export {};