@envelop/types
Advanced tools
Comparing version 5.1.0-alpha-20250218165318-0f4068a24afd863b876d6286931b9f1d8131a982 to 5.1.0-alpha-20250218172503-2c0ef8a7dbe31110fbef117b06efd055d9399498
{ | ||
"name": "@envelop/types", | ||
"version": "5.1.0-alpha-20250218165318-0f4068a24afd863b876d6286931b9f1d8131a982", | ||
"version": "5.1.0-alpha-20250218172503-2c0ef8a7dbe31110fbef117b06efd055d9399498", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "dependencies": { |
import { OnContextBuildingHook, OnEnvelopedHook, OnExecuteHook, OnParseHook, OnPluginInitHook, OnSchemaChangeHook, OnSubscribeHook, OnValidateHook } from './hooks.js'; | ||
import type { PromiseOrValue } from './utils.js'; | ||
export interface Plugin<PluginContext extends Record<string, any> = {}> { | ||
tracer?: Tracer<PluginContext>; | ||
/** | ||
@@ -38,21 +36,1 @@ * Invoked for each call to getEnveloped. | ||
} | ||
export type Tracer<TContext extends Record<string, any>> = { | ||
init?: (payload: { | ||
context: TContext; | ||
}, wrapped: () => void) => void; | ||
parse?: (payload: { | ||
context: TContext; | ||
}, wrapped: () => void) => void; | ||
validate?: (payload: { | ||
context: TContext; | ||
}, wrapped: () => void) => void; | ||
context?: (payload: { | ||
context: TContext; | ||
}, wrapped: () => void) => void; | ||
execute?: (payload: { | ||
context: TContext; | ||
}, wrapped: () => PromiseOrValue<void>) => PromiseOrValue<void>; | ||
subscribe?: (payload: { | ||
context: TContext; | ||
}, wrapped: () => PromiseOrValue<void>) => PromiseOrValue<void>; | ||
}; |
Sorry, the diff of this file is not supported yet
49290
649