Closed hzlmn closed 7 years ago
@hzlmn Woah, this is awesome thank you! 🤘
Should we pass @typings/node as peerDependency ?
What would that be used for? I thought typings are mostly there to help code editors offer better completion, help type linters to check for type mismatches, etc.
Nice @hzlmn! I'm not sure what the answers are to your questions. I don't use TS but can help you find the answer if you need help.
Also, do you mind restructuring a little bit? Can we move this to the project root as fly.d.ts
?
Then you also have to add fly.d.ts
to the files
entry of the package.json
, or else your hard work won't be downloaded.
@jbucaran Yes, they are. But as fly is node tool it use some Node APIs like Buffer
, for example, that is unknown for TypeScript by default, but there are separate declarations for Node
@typings/node
@lukeed Yes sure, restructuring is good, that's why i create this as a WIP
Possible solutions is to add @types/node
as a peerDependency like here or just define any
type for Node related stuffs but it is not very convenient.
Thanks!
Hmm.. It's probably not ideal, but I think the any
type might be better here, because we don't want to tell every downloader that they're missing a peerDep
for @types/node
. I, for one, would be annoyed by that since I don't use TS.
Sorry, forgot about it. Updated
cc @lukeed @jbucaran
Hi, as discussed.
Also i am wondering how we could describe node related functions like
read
write
that works withBuffer
object ? Should we pass@typings/node
aspeerDependency
?