dot-diver icon indicating copy to clipboard operation
dot-diver copied to clipboard

Index signature in object gets ignored

Open djfhe opened this issue 1 year ago • 1 comments

Example Type:

export type ExampleType = {
  id: number
} & Record<`test_data.${string}`, number | string | boolean>

Here test_data.foo is not a valid path in getByPath and will throw a typescript error.

djfhe avatar Feb 07 '24 14:02 djfhe

Well this is not actually a error. Path with '.' have to be ignored at the moment, since we can't distinguish between actually accessing a nested object or accessing a property which key contains a '.'. Any idea for a elegant solution to still allow this? @saibotk

djfhe avatar Mar 27 '24 19:03 djfhe

Closing this issue for now, since i see now way to allow properties with dots.

djfhe avatar Jun 02 '24 16:06 djfhe