Skip to content

Commit

Permalink
test(ts3.8): fix ts3.8 type check test to not include dom types (#4238)
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich authored Nov 6, 2024
1 parent d2c32bb commit eb1e19f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
24 changes: 24 additions & 0 deletions dev-packages/type-check/ts3.8-test/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
declare global {
interface History {}
interface IDBObjectStore {}
interface Window {
fetch: any;
}
interface ShadowRoot {}
interface BufferSource {}
interface PerformanceResourceTiming {
decodedBodySize: any;
encodedBodySize: any;
duration: any;
domInteractive: any;
domContentLoadedEventEnd: any;
domContentLoadedEventStart: any;
loadEventStart: any;
loadEventEnd: number;
domComplete: number;
redirectCount: number;
}
interface PerformanceEntry {}
}
import 'react-native';

// we need to import the SDK to ensure tsc check the types
import * as _Sentry from '@sentry/react-native';
2 changes: 1 addition & 1 deletion dev-packages/type-check/ts3.8-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "MIT",
"devDependencies": {
"@types/react": "17.0.58",
"@types/react": "17.0.83",
"@types/react-native": "0.65.30",
"typescript": "3.8.3"
},
Expand Down
2 changes: 2 additions & 0 deletions dev-packages/type-check/ts3.8-test/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"compilerOptions": {
"skipLibCheck": false,
"noEmit": true,
"importHelpers": true,
"types": [],
"lib": ["es2015"],
"jsx": "react-native",
"target": "es6",
"moduleResolution": "node",
Expand Down

0 comments on commit eb1e19f

Please sign in to comment.