prettier/tests/decorators-ts/property-decorator.ts

12 lines
248 B
TypeScript

class Greeter {
@format("Hello, %s") greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
let formatString = getFormat(this, "greeting");
return formatString.replace("%s", this.greeting);
}
}