myxvisual / react-uwp

📱⌨ React Components that Implement Microsoft's UWP Design & Fluent Design.
https://react-uwp.com
MIT License
1.18k stars 78 forks source link

Interface 'CheckBoxProps' cannot simultaneously extend types 'DataProps' and 'HTMLAttributes<HTMLDivElement>'. Named property 'defaultChecked' of types 'DataProps' and 'HTMLAttributes<HTMLDivElement>' are not identical. #40

Open eightHundreds opened 6 years ago

eightHundreds commented 6 years ago

Problem description

使用create-react-app --scripts-version=react-scripts-ts创建的空项目 使用readme的代码

编译时出现的问题

 "dependencies": {
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-scripts-ts": "2.10.0",
    "react-uwp": "^1.1.8"
  },
  "scripts": {
    "start": "react-scripts-ts start",
    "build": "react-scripts-ts build",
    "test": "react-scripts-ts test --env=jsdom",
    "eject": "react-scripts-ts eject"
  },
  "devDependencies": {
    "@types/jest": "^22.0.1",
    "@types/node": "^9.3.0",
    "@types/react": "^16.0.34",
    "@types/react-dom": "^16.0.3"
  }
ralexand56 commented 6 years ago

Is there a workaround for this issue?

eightHundreds commented 6 years ago

no,type declaration document(*.d.ts) of this project is wrong.

i gave up create-react-app

ralexand56 commented 6 years ago

Thanks for the response. So is this a create react app issue or a react-uwp issue?

ralexand56 commented 6 years ago

Hopefully someone will let users know when this will be usable in typescript projects. They really should put a disclaimer saying that typescript definitions are messed up.

zipzou commented 6 years ago

tsconfig.json { "compilerOptions": { ... "skipLibCheck": true } }