This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
讨论:支持 TypeScript 的类型注解 #891
Comments
不怕麻烦的话可以加 |
好,等我回来我就启动这项工作。 |
草案: #908 ,当工作完成时,将标记为可合并 |
好 |
@Binaryify https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/module/avatar_upload.js 这个接口有办法在node端使用嘛,有的话例子能不能给一个呢 |
const { avatar_upload, login_cellphone } = require('./main')
const fs = require('fs')
const path = require('path')
async function main() {
const result = await login_cellphone({
phone: '手机号',
password: '密码'
})
const filePath = './test.jpg'
await avatar_upload({
imgFile: {
name: path.basename(filePath),
data: fs.readFileSync(filePath)
},
cookie: result.body.cookie
})
}
main() 这样 |
俩上传接口的参数和返回结果内容大同小异,只是歌单封面上传需要多传一个歌单id |
好,稍晚我更新下这两个接口的注解 |
好~ |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
起因
现在的 Module 还没有一套能使用的类型注解,这对于使用 TypeScript 的同学带来诸多不便。
目的
如果讨论顺利的话,我可以提交 PR 以支持 @types
The text was updated successfully, but these errors were encountered: