vscode-postfix-ts icon indicating copy to clipboard operation
vscode-postfix-ts copied to clipboard

can't work in shorter syntax for method definitions on object

Open qijizh opened this issue 2 years ago • 0 comments

It works perfectly in normal way of method definitions for objects, like obj.fn1 and obj.fn2 , but can't work in shorter syntax for method definitions on objects, like obj.fn3.

const obj = {
  fn1: function (params) {
    params.return    //works
  },
  fn2: (params) => {
    params.return    //works
  },
  fn3(params) {
    params.return    //can't work
  },
};

My English expression may not be very good, please forgive me

qijizh avatar Jul 26 '22 15:07 qijizh