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

'ReactDOM' is declared but its value is never read #33

Open
DrWYN opened this issue Oct 2, 2018 · 1 comment
Open

'ReactDOM' is declared but its value is never read #33

DrWYN opened this issue Oct 2, 2018 · 1 comment

Comments

@DrWYN
Copy link

DrWYN commented Oct 2, 2018

  • node: v8.5.0

  • npm : v6.1.0

  • "react": "^16.5.2",

  • "gaea-editor": "^2.3.15",

使用create-react-app-ts创建的ts项目,npm install gaea-editor后,index文件引入gaea-editor,npm start报错

index.tsx

import Editor from 'gaea-editor';

ReactDOM.render(
<Editor />,
document.getElementById('root') as HTMLElement
);

npm start

./node_modules/dob-react/src/connect.ts
(2,1): 'ReactDOM' is declared but its value is never read.

@AIMentalModel
Copy link

AIMentalModel commented May 22, 2019

@DrWYN 是tslint语言检查的关系,修改一下tsconfig.json就可以了,主要删掉几个配置项,你可以借鉴一下.然后再安装几个需要的ts生命就行了.
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "build/dist",
"module": "esnext",
"target": "esnext",
"lib": [
"es5",
"es6",
"dom",
"scripthost"
],
"sourceMap": true,
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"strictNullChecks": false,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": false,
"noImplicitThis": true,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"experimentalDecorators": true,
"skipLibCheck": true,
},
"exclude": [
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants