js-assistant icon indicating copy to clipboard operation
js-assistant copied to clipboard

Feature Request: transform object property assignment to `defineProperty`

Open aghArdeshir opened this issue 2 years ago • 0 comments

refactor

myObject.someProp = 'someValue'

to

Object.defineProperty(myObject, 'someProp', {
  value: 'someValue'
})

I use this technique a lot for bypassing TypeScript :grin: But I believe we may be able to find good use cases for it as well. : )

aghArdeshir avatar Aug 01 '23 11:08 aghArdeshir