Typecript method, the parameter does not support the function and the character of the joint type, prompt TS2345 error 