Skip to content

Commit 698008c

Browse files
committed
refactor: move global type
1 parent 6e09509 commit 698008c

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

runtime/v1/env.d.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference types="./global.d.ts" />
2+
13
declare module '*.html' {
24
const src: string;
35
export default src;
@@ -46,9 +48,3 @@ declare module '*.json' {
4648
declare module 'react/jsx-runtime' {
4749
export * from '/runtime/v1/react@18.x/jsx-runtime';
4850
}
49-
50-
declare global {
51-
type IsOpenDataCaptureRepo = typeof import('../../package.json') extends { __isODCRepo: NonNullable<unknown> }
52-
? true
53-
: false;
54-
}

runtime/v1/global.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare type IsOpenDataCaptureRepo = typeof import('../../package.json') extends { __isODCRepo: NonNullable<unknown> }
2+
? true
3+
: false;

runtime/v1/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
},
2424
"files": [
2525
"dist",
26-
"env.d.ts"
26+
"env.d.ts",
27+
"global.d.ts"
2728
],
2829
"scripts": {
2930
"build": "pnpm exec runtime-bundler"

runtime/v1/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"lib": ["DOM", "DOM.Iterable", "ESNext"],
66
"rootDir": "../.."
77
},
8-
"include": ["build.ts", "src/**/*", "*.js", "*.cjs", "env.d.ts"]
8+
"include": ["build.ts", "src/**/*", "*.js", "*.cjs", "env.d.ts", "global.d.ts"]
99
}

0 commit comments

Comments
 (0)