Skip to content
Myr

fix(types): rm ExcludeEmptyObject to fix massively increased type instantiations (#3507)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fix: mv ExcludeEmptyObject to hono-base.ts * refactor: rm ExcludeEmptyObject

authored by m-shaka · committed by GitHub · parent bd9effe · Browse files · 4 files+4 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+4 added−10 removed

  • other:+4 added−10 removed

4 files+4 added−10 removed

modified:perf-measures/type-check/client.ts+1 added-1 removed
modified:src/client/types.ts+2 added-1 removed
modified:src/utils/types.ts-2 removed
95 unmodified lines
96 * String literal types with auto-completion97 * @see https://github.com/Microsoft/TypeScript/issues/2972998 */99export type StringLiteralUnion<T> = T | (string & Record<never, never>)100101export type ExcludeEmptyObject<T> = T extends {} ? ({} extends T ? never : T) : T
modified:src/hono-base.ts+1 added-6 removed
24 unmodified lines
25 OnHandlerInterface,26 RouterRoute,27 Schema,28} from './types'29import type { ExcludeEmptyObject } from './utils/types'29import { getPath, getPathNoStrict, mergePath } from './utils/url'3031/**32 * Symbol used to mark a composed handler.
178 unmodified lines
211 SubBasePath extends string212 >(213 path: SubPath,214 app: Hono<SubEnv, SubSchema, SubBasePath>216 ): Hono<217 E,218 ExcludeEmptyObject<MergeSchemaPath<SubSchema, MergePath<BasePath, SubPath>> | S>,219 BasePath220 > {215 ): Hono<E, MergeSchemaPath<SubSchema, MergePath<BasePath, SubPath>> | S, BasePath> {216 const subApp = this.basePath(path)217 app.routes.map((r) => {218 let handler219 if (app.errorHandler === errorHandler) {
304 unmodified lines