@org-formation/tombok
Version:
Lombok for TypeScript
22 lines (21 loc) • 501 B
TypeScript
/**
* 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;