[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 1001- 2ch.scのread.cgiへ]
Update time : 03/16 07:51 / Filesize : 265 KB / Number-of Response : 1047
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

TypeScript part2



812 名前:デフォルトの名無しさん mailto:sage [2017/07/10(月) 13:26:30.50 ID:gqDySAuG.net]
typescriptのエラーってよくわかんないことある

(81,32): error TS2322: Type '{ path: "/logout"; component: typeof Logout; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Route> & Readonly<{ children?: ReactNode; }> & Rea...'.
Type '{ path: "/logout"; component: typeof Logout; }' is not assignable to type 'Readonly<RouteProps>'.
Types of property 'component' are incompatible.
Type 'typeof Logout' is not assignable to type 'StatelessComponent<RouteComponentProps<any> | undefined> | ComponentClass<RouteComponentProps<any...'.
Type 'typeof Logout' is not assignable to type 'ComponentClass<RouteComponentProps<any> | undefined>'.

ってでて、何のことかわからない。

偶然解決して、総合するとReact.Componet<P,S>のSをvoidに指定は駄目ってことらしい。
上記エラーメッセージからどう読み取ればそういうことなわけ?






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<265KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef