在示例中,使用了以下代码:
import { BearerStrategy } from 'passport-azure-ad'
const bearerStrategy = new BearerStrategy(config, (token, done) => {
// Send user info using the second argument
done(null, {}, token);
}
);
src/index.ts:26:12 - error TS2349: This expression is not callable.
Type 'ITokenPayload' has no call signatures.
26 return done(null, {}, token)
虽然代码有效,但我想知道如何避免这个错误。