Type 'void' is not assignable to type '((event: MouseEvent) => void) | undefined'

后端 未结 5 1728
花落未央
花落未央 2020-12-24 11:06
   import * as React from \"react\";
   import \"./App.css\";
   import PageTwo from \"./components/PageTwo\";

    export interface IPropsk {
        data?: Array&l         


        
5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-24 11:26

    You can just set type this way and you will get no errors

    export interface IPropsk {
        data?: Array;
        fetchData?(): (value: string) => void;
    }
    

提交回复
热议问题