Comparing version 2.5.7 to 2.5.8
@@ -173,6 +173,6 @@ "use strict"; | ||
} | ||
if (typeof global?.EdgeRuntime !== "string") { | ||
if (typeof global?.EdgeRuntime === "string") { | ||
return "vercel"; | ||
} | ||
if (global?.process?.title === "node") { | ||
if (global?.process?.release?.name === "node") { | ||
return "node"; | ||
@@ -179,0 +179,0 @@ } |
@@ -151,6 +151,6 @@ // src/context.ts | ||
} | ||
if (typeof global?.EdgeRuntime !== "string") { | ||
if (typeof global?.EdgeRuntime === "string") { | ||
return "vercel"; | ||
} | ||
if (global?.process?.title === "node") { | ||
if (global?.process?.release?.name === "node") { | ||
return "node"; | ||
@@ -157,0 +157,0 @@ } |
import type { HtmlEscapedString } from '../../utils/html'; | ||
export declare const raw: (value: any) => HtmlEscapedString; | ||
export declare const html: (strings: TemplateStringsArray, ...values: any[]) => HtmlEscapedString; | ||
export declare const raw: (value: unknown) => HtmlEscapedString; | ||
export declare const html: (strings: TemplateStringsArray, ...values: unknown[]) => HtmlEscapedString; |
import type { StringBuffer, HtmlEscaped, HtmlEscapedString } from '../../utils/html'; | ||
declare type Props = Record<string, any>; | ||
declare global { | ||
namespace jsx.JSX { | ||
interface IntrinsicElements { | ||
[tagName: string]: Record<string, any>; | ||
[tagName: string]: Props; | ||
} | ||
@@ -12,6 +13,6 @@ } | ||
tag: string | Function; | ||
props: Record<string, any>; | ||
props: Props; | ||
children: Child[]; | ||
isEscaped: true; | ||
constructor(tag: string | Function, props: Record<string, any>, children: Child[]); | ||
constructor(tag: string | Function, props: Props, children: Child[]); | ||
toString(): string; | ||
@@ -21,8 +22,8 @@ toStringToBuffer(buffer: StringBuffer): void; | ||
export { jsxFn as jsx }; | ||
declare const jsxFn: (tag: string | Function, props: Record<string, any>, ...children: (string | HtmlEscapedString)[]) => JSXNode; | ||
declare type FC<T = Record<string, any>> = (props: T) => HtmlEscapedString; | ||
declare const jsxFn: (tag: string | Function, props: Props, ...children: (string | HtmlEscapedString)[]) => JSXNode; | ||
declare type FC<T = Props> = (props: T) => HtmlEscapedString; | ||
export declare const memo: <T>(component: FC<T>, propsAreEqual?: (prevProps: Readonly<T>, nextProps: Readonly<T>) => boolean) => FC<T>; | ||
export declare const Fragment: (props: { | ||
key?: string; | ||
children?: any; | ||
children?: Child[]; | ||
}) => JSXNode; |
import type { JSXNode } from '.'; | ||
export { Fragment } from '.'; | ||
export declare function jsxDEV(tag: string | Function, props: Record<string, any>): JSXNode; | ||
export declare function jsxDEV(tag: string | Function, props: Record<string, unknown>): JSXNode; |
import type { BodyData } from './utils/body'; | ||
import type { Cookie } from './utils/cookie'; | ||
declare type ValidatedData = Record<string, any>; | ||
declare type ValidatedData = Record<string, unknown>; | ||
declare global { | ||
@@ -5,0 +5,0 @@ interface Request<CfHostMetadata = unknown, ParamKeyType extends string = string, Data extends ValidatedData = ValidatedData> { |
@@ -23,5 +23,5 @@ import type { Context } from './context'; | ||
export interface ExecutionContext { | ||
waitUntil(promise: Promise<any>): void; | ||
waitUntil(promise: Promise<void>): void; | ||
passThroughOnException(): void; | ||
} | ||
export {}; |
@@ -77,3 +77,3 @@ import type { JSONObject, JSONPrimitive, JSONArray } from './../utils/json'; | ||
validate: <R extends Request<unknown, string, { | ||
[x: string]: any; | ||
[x: string]: unknown; | ||
}>>(req: R) => Promise<ValidateResult[]>; | ||
@@ -80,0 +80,0 @@ protected getTypeRuleName(): string; |
{ | ||
"name": "hono", | ||
"version": "2.5.7", | ||
"version": "2.5.8", | ||
"description": "Ultrafast web framework for Cloudflare Workers, Deno, and Bun.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
289085
8584