simon300000 / bili-api

Bilibili Node.js API
MIT License
320 stars 31 forks source link

typescript没有声明文件 #161

Open PullAndRun opened 1 year ago

PullAndRun commented 1 year ago

请求增加ts声明文件

simon300000 commented 1 year ago

加入todo

tingshuai commented 1 year ago

什么意思,说详细点呗...

simon300000 commented 1 year ago

什么意思,说详细点呗...

他的意思应该是我这个js写的包没有ts的类型提示吧

tingshuai commented 1 year ago

加入todo

我是说你这个详细点,没明白这是应该怎么做?自己写个类型注释吗?

simon300000 commented 1 year ago

我确实还没搞清楚怎么做 如果你有什么好办法的话…😘

PullAndRun commented 1 year ago

加入todo

我是说你这个详细点,没明白这是应该怎么做?自己写个类型注释吗?

写个.d.ts,懒得手写可以自动生成一个。

PullAndRun commented 1 year ago

我确实还没搞清楚怎么做 如果你有什么好办法的话…😘

http://www.patrickzhong.com/TypeScript/zh/declaration-files/index.html

simon300000 commented 1 year ago

目前这整个项目是js的也就是说我还不能直接生成,首先可能要把一部分文件变成ts,然后看看有没有什么现成的bilibili api types

PullAndRun commented 1 year ago

目前这整个项目是js的也就是说我还不能直接生成,首先可能要把一部分文件变成ts,然后看看有没有什么现成的bilibili api types

js源代码不用动,单独写一个声明文件就行。现在的新项目基本全是ts的,没有类型提示很难用。

hacxy commented 5 months ago

有typescript兼容的计划吗?