@hapiness/core
Version:
Project to have a HapiJS (https://hapijs.com/) based framework to create easier NodeJS back-end with some awesome features
41 lines (40 loc) • 1.06 kB
TypeScript
import { Type, TypeDecorator, makeDecorator, Inject, Injectable, InjectionToken, Optional } from 'injection-js';
export { Injectable, Inject, Optional, InjectionToken, Type, makeDecorator };
/**
* Decorator signature
*/
export interface CoreDecorator<T> {
(obj: T): TypeDecorator;
new (obj: T): T;
}
/**
* Create a decorator with metadata
*
* @param {string} name
* @param {{[name:string]:any;}} props?
* @returns CoreDecorator
*/
export declare function createDecorator<T>(name: string, props?: {
[name: string]: any;
}): CoreDecorator<T>;
/**
* HapinessModule decorator and metadata.
*
* @Annotation
*/
export interface HapinessModule {
version: string;
declarations?: Array<Type<any> | any>;
providers?: Array<Type<any> | any>;
imports?: Array<Type<any> | any>;
exports?: Array<Type<any> | any>;
}
export declare const HapinessModule: CoreDecorator<HapinessModule>;
/**
* Lib decorator and metadata.
*
* @Annotation
*/
export interface Lib {
}
export declare const Lib: (...args: any[]) => (cls: any) => any;