Skip to content

Commit

Permalink
refactor: remove TypeInitialContext
Browse files Browse the repository at this point in the history
  • Loading branch information
unnoq committed Feb 16, 2025
1 parent bf323bf commit 3aaf1ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/server/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import type { IsNever } from '@orpc/shared'

export type Context = Record<string, any>

export type TypeInitialContext<T extends Context> = (type: T) => unknown

export type MergedContext<T extends Context, U extends Context> = T & U

export function mergeContext<T extends Context, U extends Context>(
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/procedure.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ContractProcedureDef, ErrorMap, Meta, ORPCErrorConstructorMap, Schema, SchemaInput, SchemaOutput } from '@orpc/contract'
import type { Promisable } from '@orpc/shared'
import type { Context, TypeInitialContext } from './context'
import type { Context } from './context'
import type { AnyMiddleware } from './middleware'
import { isContractProcedure } from '@orpc/contract'

Expand Down Expand Up @@ -41,7 +41,7 @@ export interface ProcedureDef<
TErrorMap extends ErrorMap,
TMeta extends Meta,
> extends ContractProcedureDef<TInputSchema, TOutputSchema, TErrorMap, TMeta> {
__initialContext?: TypeInitialContext<TInitialContext>
__initialContext?: (type: TInitialContext) => unknown
middlewares: AnyMiddleware[]
inputValidationIndex: number
outputValidationIndex: number
Expand Down

0 comments on commit 3aaf1ad

Please sign in to comment.