Skip to content

Commit 6e09509

Browse files
committed
feat: add IsOpenDataCaptureRepo global type
1 parent 5403c69 commit 6e09509

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,6 @@
9797
"@mdx-js/react>@types/react": "18.x"
9898
}
9999
}
100-
}
100+
},
101+
"__isODCRepo": true
101102
}

runtime/v1/env.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ declare module '*.json' {
4646
declare module 'react/jsx-runtime' {
4747
export * from '/runtime/v1/react@18.x/jsx-runtime';
4848
}
49+
50+
declare global {
51+
type IsOpenDataCaptureRepo = typeof import('../../package.json') extends { __isODCRepo: NonNullable<unknown> }
52+
? true
53+
: false;
54+
}

0 commit comments

Comments
 (0)