Implement all members/fields typescript outright not working or missing fields

I have the following interface defined 

 

And when creating an instance of that Entry object and attempting to use ‘Implement all members’ on the meta field I get the ‘No members to implement have been found’ error.

Further more, I have a type defined with Pick (Obfuscated fields, it does compile properly)

And when using the “Implement all required members” (Which pops up from a different menu from some reason? not like the previous one) It only implements some of the fields?

 

Any idea on what should I configure to make this work? any plugin to better do this? Honestly for so much money over VSCode I'd expect this to work properly.

0
3 comments

Unfortunately I failed to reproduce the issue. If I put a cursor within braces in meta: {} in

interface ITest {
  name: string
  meta: {
    id: string
  }
}

const Test: ITest = {
  name: "",
  meta: {},

}

 

and choose Code > Generate > Implement Members from the main menu, I get:

What IDE version do you work with? Code you share full, self-containing code snippets (as text) that reproduce the issue?

1

Hi Elena thanks for the quick reply - you are correct, it does work, my issue was that my pointer was not at the meta value (the empty object) but on the meta field name itself. It does work when on the value. 

 

Have you tried the second issue?

0
Could you share a self-containing code snippet (as text) that reproduces it?
0

Please sign in to leave a comment.