joarwilk / flowgen

Generate flowtype definition files from TypeScript
Other
658 stars 78 forks source link

Allow scoped module names #203

Open joshuanapoli opened 1 year ago

joshuanapoli commented 1 year ago

fixes #202

Treat the module name as a string, rather than a typescript identifier. This lets you use scoped module names in the --as-module cli argument.

npx flowgen module.d.ts -o module.js --no-inexact --as-module '@company/module'

The flow output is like this:

declare module "@company/module" {
  declare export function myFunction();
}