@dazejs/framework
Version:
Daze.js - A powerful web framework for Node.js
32 lines (31 loc) • 1.71 kB
TypeScript
/// <reference types="node" />
import { OutgoingHttpHeaders } from 'http';
import { Config } from './config';
import { Application } from './foundation/application';
import { Request } from './http/request';
import { Response } from './http/response';
import { Redirect } from './http/response/redirect';
import { Validate } from './validate';
import { Resource } from './resource';
import { View } from './view';
export declare function app(): Application;
export declare function app<T = any>(name: any): T;
export declare function config(): Config;
export declare function config(name: string): any;
export declare function config(name: string, defaultValue?: any): any;
export declare function contextStore(): Map<string, any>;
export declare function request(): Request;
export declare function db(name?: string): import("./supports/database/manager").Manager;
export declare function redis(name?: string): import("./supports/redis").RedisClient;
export declare function cache(name?: 'memory' | 'redis', connection?: string): import("./supports/cache/store").CacheStore;
export declare function view(template?: string, vars?: object): View;
export declare function response(data?: any, code?: number, header?: OutgoingHttpHeaders): Response;
export declare function redirect(url?: string, code?: number, header?: OutgoingHttpHeaders): Redirect;
export declare function validate(validator: any): Validate;
export declare function resource(formater?: any): {
item: (data: Record<string, any>) => Resource;
collection: (data: Record<string, any>[]) => Resource;
};
export declare function model<TEntity>(_Entity: {
new (): TEntity;
}): import("./supports/orm").Repository<TEntity> & TEntity;