typescript - nextjs-auth 授权凭证类型记录
问题描述
如果我使用,我不明白在授权处理程序中使用 Record<never, string>
credentials: {
email: { type: "text" },
password: { type: "password" }
},
凭据的类型为 Record<'email', 'password', string>
如果不使用,它们的类型为 Record<never, string>
你能解释一下为什么吗,如果有一种方法可以在没有
上面的代码(没有很难输入凭据)?
解决方案
推荐阅读
- javascript - 如何在类的构造函数中添加事件侦听器,但句柄函数调用类内部的方法(es6)?
- regex - 具有固定组的特定正则表达式
- npm - 可以在 package.lock.json 依赖树的不同部分中存在同一个包的多个版本吗?
- sql - 将从光标获取的数据复制到 CSV PostgreSQL
- xamarin.forms - 我正在尝试通过在 xamarin 表单上使用绑定来嵌入图像
- python - 使用 python 读取给定 URL 的网络请求
- metadata - 获取 Wikidata 项目查看次数/流行度指数
- java - Harmony OS 中 TextView Android 中阴影的替代方案是什么?
- r - 如何使用 R 制作对称矩阵?
- python - fuzz.token_sort_ratio() 结果不一致?