UNPKG

525 BPlain TextView Raw
1// Copyright IBM Corp. 2018,2020. All Rights Reserved.
2// Node module: @loopback/build
3// This file is licensed under the MIT License.
4// License text available at https://opensource.org/licenses/MIT
5
6/**
7 * log decorator
8 */
9export function log() {
10 return function (target: object | Function) {};
11}
12
13/**
14 * Hello class
15 */
16@log()
17export class Hello {
18 constructor(public name: string) {}
19
20 /**
21 * Return a greeting
22 * @param msg - Message
23 */
24 greet(msg: string) {
25 return `Hello, ${this.name}: ${msg}`;
26 }
27}