Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ts3.8): fix ts3.8 type check test to not include dom types #4238

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is has to to match with dependency of the react native types.

"@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
Loading