phero-hq / phero

Full-stack type-safety with pure TypeScript

Home Page:https://phero.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support adding namespaces for your models and services`

kamilafsar opened this issue · comments

export namespace todo.aap {
    export const service = createService(
        {
            list,
            create,
            update,
            updateTodoStatus,
            markAllAsDone,
            remove,
        },
        {
            middleware: [authenticate],
        }
    );
}
  • Let the user decide what the namespace is of their services and models based on the "export namespace" syntax
  • generate classes/interfaces for the services
  • when there's no namespace export, all services, and models will go into the global namespace
  • remove domain namespace / code to calculate shared models