tsc error with typescript@2.1
See original GitHub issueantd-tools run compile
components/modal/confirm.tsx(92,7): error TS2531: Object is possibly 'null'.
components/tooltip/index.tsx(127,40): error TS2345: Argument of type 'ReactElement<any> | (undefined & ReactElement<any>) | (null & undefined) | (null & ReactElement<a...' is not assignable to parameter of type '{}'.
Type 'undefined' is not assignable to type '{}'.
components/tooltip/index.tsx(128,24): error TS2532: Object is possibly 'undefined'.
components/tooltip/index.tsx(128,30): error TS2339: Property 'props' does not exist on type 'ReactElement<any> | (undefined & ReactElement<any>) | (null & ReactElement<any>) | (string & unde...'.
Property 'props' does not exist on type 'string & undefined'.
components/tooltip/index.tsx(143,33): error TS2345: Argument of type 'ReactElement<any> | (undefined & ReactElement<any>) | (null & undefined) | (null & ReactElement<a...' is not assignable to parameter of type 'ReactElement<any>'.
Type 'undefined' is not assignable to type 'ReactElement<any>'.
[14:08:49] TypeScript: 5 semantic errors
[14:08:49] TypeScript: emit succeeded (with errors)
And travis is ok.
$ tsc -v
2.0.10
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (18 by maintainers)
Top Results From Across the Web
`tsc` error swallowed -- file is treeshaken · Issue #89 - GitHub
raw tsc emit TS2554 error but rollup+rollup-plugin-typescript wouldn't ... https://github.com/ezolenko/rollup-plugin-typescript2 import ...
Read more >Typescript inherited interface and literal string type key error
However, Typescript 2.1 is giving me a compile error: Cannot invoke an expression whose type lacks a call signature. Type '{ <U>(this: [A ......
Read more >Documentation - TypeScript 2.1
TypeScript 2.1 supports inheriting configuration using extends , where: extends is a new top-level property in tsconfig. json (alongside compilerOptions , ...
Read more >Custom Errors in TypeScript 2.1 - Chris Hager
TypeScript 2.1 introduced a number of breaking changes, among them that “Extending built-ins like Error, Array, and Map may no longer work”.
Read more >TypeScript errors and how to fix them
error TS1192: Module ' json5 ' has no default export. Broken Code ❌. 1, import json5 from 'json5 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
配置
jsx
为preserve
可以不经过TypeScript
处理React
. 编译出来的 js 跟我们写es6一样.This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.