-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Labels
Description
Currently, namespace parameter is required.
If one runs schemats without argument -n (or with empty one) like that :
schemats generate -c postgres://postgres@localhost/osm -t users -o osm.ts
It ends up with the following output in osm.ts :
export namespace undefined {
export namespace usersFields {
...
Using a namespace for a whole module in typescript is ok, but a bit outdated.
With es2015 modules, it seems preferable to generate directly :
export namespace usersFields {
...
wich allows to import as following :
import * as myNamespaceInConsumerModule from 'osm.ts'
...
It would be nice to make namespace optional.