Skip to content

Commit 072100c

Browse files
committed
fix: allow legacy instrument properties
1 parent 00bcf66 commit 072100c

1 file changed

Lines changed: 8 additions & 17 deletions

File tree

packages/runtime-core/src/define.d.ts

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,19 @@ type DiscriminatedInstrument<
2020
: never
2121
: never;
2222

23-
/** @public */
24-
type LegacyInstrumentProperties = {
25-
details: {
26-
estimatedDuration?: never;
27-
instructions?: never;
28-
};
29-
};
30-
3123
/** @public */
3224
type InstrumentDef<
3325
TKind extends InstrumentKind,
3426
TLanguage extends InstrumentLanguage,
3527
TSchema extends z.ZodTypeAny
36-
> = LegacyInstrumentProperties &
37-
Omit<
38-
DiscriminatedInstrument<TKind, TLanguage, z.TypeOf<TSchema>>,
39-
'__runtimeVersion' | 'kind' | 'language' | 'validationSchema'
40-
> & {
41-
kind: TKind;
42-
language: TLanguage;
43-
validationSchema: TSchema;
44-
};
28+
> = Omit<
29+
DiscriminatedInstrument<TKind, TLanguage, z.TypeOf<TSchema>>,
30+
'__runtimeVersion' | 'kind' | 'language' | 'validationSchema'
31+
> & {
32+
kind: TKind;
33+
language: TLanguage;
34+
validationSchema: TSchema;
35+
};
4536

4637
/** @public */
4738
export declare function defineInstrument<

0 commit comments

Comments
 (0)