Skip to content

Commit 5e17dfb

Browse files
Copilothuangyiirene
andcommitted
Fix TypeScript errors in designer-modes example
- Remove unnecessary React import from App.tsx (jsx: react-jsx handles JSX automatically) - Update main.tsx to use named imports instead of namespace import - Add vite/client types to tsconfig for CSS import support Fixes TS6133 and TS2307 errors that were causing CI build failures Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 4194da2 commit 5e17dfb

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

examples/designer-modes/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import { useState } from 'react';
22
import { Designer, type DesignerMode } from '@object-ui/designer';
33
import type { SchemaNode } from '@object-ui/core';
44

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom/client';
1+
import { StrictMode } from 'react';
2+
import { createRoot } from 'react-dom/client';
33
import App from './App';
44
import './index.css';
55

6-
ReactDOM.createRoot(document.getElementById('root')!).render(
7-
<React.StrictMode>
6+
createRoot(document.getElementById('root')!).render(
7+
<StrictMode>
88
<App />
9-
</React.StrictMode>,
9+
</StrictMode>,
1010
);

examples/designer-modes/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"useDefineForClassFields": true,
55
"lib": ["ES2020", "DOM", "DOM.Iterable"],
66
"module": "ESNext",
7+
"types": ["vite/client"],
78
"skipLibCheck": true,
89

910
/* Bundler mode */

0 commit comments

Comments
 (0)