Home > Enterprise >  i am tryin to create a method decorator in angular but this error shows up
i am tryin to create a method decorator in angular but this error shows up

Time:02-08

export class IceCreamComponent {
  @Emoji()
  flavor = 'vanilla';
}


// Property Decorator
function Emoji() {
  return function(target: Object, key: string | symbol) {

    let val = target[key];

    const getter = () =>  {
        return val;
    };
    const setter = (next:any) => {
        console.log('updating flavor...');
        val = `           
  •  Tags:  
  • Related