Add a mode to generate interfaces that produces a modulename.ts file instead of a namespace for each EdgeDB module
before:
import { Movie, example } from 'interfaces.ts'
type Watched = {
movie: Movie,
person: example.User
}
after:
import { Movie } from 'interfaces/default.ts'
// could also keep the name. or always generate both
// and have an identical to today `interfaces.ts` that reexports the esmodules
import { User } from 'interfaces/example.ts'
type Watched = {
movie: Movie,
person: User
}
why?
i like to write User instead of example.User
better performance (if modules don't reference all other modules)
Add a mode to
generate interfaces
that produces amodulename.ts
file instead of a namespace for each EdgeDB modulebefore:
after:
why?
User
instead ofexample.User