Skip to content

Commit 9caa59e

Browse files
committed
fix: typescript errors
1 parent 48f4454 commit 9caa59e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

example/src/initGlobals.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { Buffer as CraftzdogBuffer } from '@craftzdog/react-native-buffer'
22

33
declare global {
44
var Buffer: typeof CraftzdogBuffer
5+
}
56

6-
var process: {
7-
cwd: () => string
8-
env: { NODE_ENV: string }
9-
}
7+
if (!globalThis.process) {
8+
// @ts-expect-error
9+
globalThis.process = {}
1010
}
1111

1212
globalThis.Buffer = CraftzdogBuffer

example/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"extends": "../config/tsconfig.json",
33
"include": ["src", "index.js"],
44
"compilerOptions": {
5-
"experimentalDecorators": true
5+
"experimentalDecorators": true,
6+
"module": "ESNext",
7+
"moduleResolution": "Bundler"
68
}
79
}

0 commit comments

Comments
 (0)