Skip to content

Commit 23ebc59

Browse files
committed
fix: interface augmentation
1 parent 7790b3c commit 23ebc59

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

packages/runtime-core/src/define.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ import type { InstrumentKind, InstrumentLanguage } from './types/instrument.base
66
import type { FormInstrument } from './types/instrument.form.js';
77
import type { InteractiveInstrument } from './types/instrument.interactive.js';
88

9+
declare global {
10+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-object-type
11+
interface OpenDataCaptureContext {}
12+
}
13+
14+
/** @public */
15+
export type IsOpenDataCaptureRepo = OpenDataCaptureContext['isRepo'];
16+
917
/** @public */
1018
// prettier-ignore
1119
export type DiscriminatedInstrument<

runtime/v1/global.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
declare type IsOpenDataCaptureRepo = typeof import('../../package.json') extends { __isODCRepo: NonNullable<unknown> }
2-
? true
3-
: false;
1+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
2+
declare interface OpenDataCaptureContext {
3+
isRepo: typeof import('../../package.json') extends { __isODCRepo: NonNullable<unknown> } ? true : false;
4+
}

0 commit comments

Comments
 (0)