Typescript types
Closed this issue ยท 8 comments
There doesn't seem to be any typescript types ๐ฑ
Hi! There are!
@types/webpack-plugin-serve
Hi! Those typings don't apply to webpack-nano
because they're for webpack-plugin-serve
.
I've got those types in my project, but still can't import from webpack-nano/argv
.
I'll double check this when I'm back at my computer in ~30 minutes, but pretty sure TypeScript won't like trying to load the @types
that have a different name to the package in question.
Yeah I just checked: those typings don't reference webpack-nano
at all, so won't be picked up by the type acquisitioner, nor consumed by TS
I was half asleep, sorry! I forgot about webpack nano hahaha
If you want you can add those to @types, but Iโll be adding those as I have time this week (pretty busy with work)
Honest question here: why would a CLI with no API interface need types?
@shellscape I know, but you can't do import argv from 'webpack-nano/argv'
w/o the types.
It's weird one, and I suspect the types will either be just an export of unknown
or any
, but there is a use-case for require
/importing... ๐คทโโ
Yeah you're absolutely right on that one. That's small enough that I wouldn't be opposed to shipping a d.ts
file in the package. Would you be willing to open a small PR for that?
Sure thing!
I'll make one right now.