UNPKG

@org-formation/tombok

Version:
22 lines (21 loc) 501 B
/** * This decorator can be used on any class property to make tombok build a Java-like getter. * * Example: * ```typescript * @getter * private foo: number; * ``` * * will generate: * * ```typescript * public getFoo(): number { * return this.foo; * } * ``` * * @param {any} target Base class where we are going to mutate its method * @param {string} key Name of the method that was decorated */ export declare function getter(target: any, key: string): void;