File tree Expand file tree Collapse file tree
packages/runtime-core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { ApprovedLicense } from '@opendatacapture/licenses';
55import type { InstrumentKind , InstrumentLanguage , InstrumentValidationSchema } from './types/instrument.base.js' ;
66import type { FormInstrument } from './types/instrument.form.js' ;
77import type { InteractiveInstrument } from './types/instrument.interactive.js' ;
8+ import type { SeriesInstrument } from './types/instrument.series.js' ;
89
910declare global {
1011 // eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-object-type
@@ -60,3 +61,12 @@ export function defineInstrument<
6061 __runtimeVersion : 1
6162 } ) as unknown as DiscriminatedInstrument < TKind , TLanguage , TSchema [ '_output' ] > ;
6263}
64+
65+ /** @public */
66+ export function defineSeriesInstrument < TLanguage extends InstrumentLanguage > (
67+ def : Omit < SeriesInstrument < TLanguage > , '__runtimeVersion' >
68+ ) : SeriesInstrument < TLanguage > {
69+ return Object . assign ( def , {
70+ __runtimeVersion : 1 as const
71+ } ) ;
72+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { Merge } from 'type-fest';
33import type { Language } from './core.js' ;
44import type { BaseInstrument , InstrumentLanguage , ScalarInstrumentInternal } from './instrument.base.js' ;
55
6- /** @beta */
6+ /** @public */
77declare type SeriesInstrument < TLanguage extends InstrumentLanguage = InstrumentLanguage > = Merge <
88 BaseInstrument < TLanguage > ,
99 {
You can’t perform that action at this time.
0 commit comments