You can associate all functions with an object and export it.
Something like that:
import { IBaseRepository } from './master';
export function create(model: string): string { return ''; }
export function edit(model: string): string { return ''; }
export function read(): string { return ''; }
export const repository: IBaseRepository<string> = { create, edit, read };
And use it as if you were using anything else that exports the module:
import { repository } from './repo';
repository.create('test');
, , , .
import { IBaseRepository } from './master';
export function create(model: string): string { return ''; }
export function edit(model: string): string { return ''; }
export function read(): string { return ''; }
export default { create, edit, read } as IBaseRepository<string>;
, :
import repo, { create } from './repo';
repo.create('test');
.
. .