From 4745eaa275e26b183573ecab63dde0d6d3eac8ea Mon Sep 17 00:00:00 2001 From: Sneaken <37062838+Sneaken@users.noreply.github.com> Date: Tue, 10 Jan 2023 20:01:21 +0800 Subject: [PATCH] fix: add missing types in TS project when global is true (#2631) --- examples/react-mui/tsconfig.json | 3 ++- examples/react-storybook/tsconfig.json | 3 ++- examples/react-testing-lib-msw/src/App.test.tsx | 1 - examples/react-testing-lib-msw/tsconfig.json | 3 ++- examples/react-testing-lib/tsconfig.json | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/react-mui/tsconfig.json b/examples/react-mui/tsconfig.json index de8ea24d7a02..c211c84456f0 100644 --- a/examples/react-mui/tsconfig.json +++ b/examples/react-mui/tsconfig.json @@ -15,6 +15,7 @@ "strict": true, "target": "ESNext", "useDefineForClassFields": true, - "useUnknownInCatchVariables": false + "useUnknownInCatchVariables": false, + "types": ["vitest/globals"] } } diff --git a/examples/react-storybook/tsconfig.json b/examples/react-storybook/tsconfig.json index 69ae1b6b8d87..8b48e8dfee78 100644 --- a/examples/react-storybook/tsconfig.json +++ b/examples/react-storybook/tsconfig.json @@ -14,7 +14,8 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "types": ["vitest/globals"] }, "include": ["./src", "./.storybook"] } diff --git a/examples/react-testing-lib-msw/src/App.test.tsx b/examples/react-testing-lib-msw/src/App.test.tsx index c31a5a95f946..4463aa6bae93 100644 --- a/examples/react-testing-lib-msw/src/App.test.tsx +++ b/examples/react-testing-lib-msw/src/App.test.tsx @@ -1,4 +1,3 @@ -import { expect, it } from 'vitest' import { ApolloProvider } from '@apollo/client' import { client } from './ApolloClient' import { render, screen, userEvent, waitForElementToBeRemoved } from './utils/test-utils' diff --git a/examples/react-testing-lib-msw/tsconfig.json b/examples/react-testing-lib-msw/tsconfig.json index 9f83659970ba..445d0b656554 100644 --- a/examples/react-testing-lib-msw/tsconfig.json +++ b/examples/react-testing-lib-msw/tsconfig.json @@ -14,7 +14,8 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "types": ["vitest/globals"] }, "include": ["./src"] } diff --git a/examples/react-testing-lib/tsconfig.json b/examples/react-testing-lib/tsconfig.json index 9f83659970ba..445d0b656554 100644 --- a/examples/react-testing-lib/tsconfig.json +++ b/examples/react-testing-lib/tsconfig.json @@ -14,7 +14,8 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "types": ["vitest/globals"] }, "include": ["./src"] }