Type alias ToDotNotation<Schema>

ToDotNotation<Schema>: Merge<_ToDotNotation<Schema, "">>

Converts some Schema into a type representing its dot notation (object paths).

If a value is any or SomeDoc, it'll be allowed to be any old object.

Note that this does NOT support indexing into arrays beyond the initial array index itself. Meaning, arr.0 is supported, but arr.0.property is not. Use a more flexible type (such as any or SomeDoc) to support that.

Type Parameters


interface BasicSchema {
  num: number,
  arr: string[],
  obj: {
  nested: string,
  someDoc: SomeDoc,

interface BasicSchemaInDotNotation {
  'num': number,
  'arr': string[],
  [`arr.${number}`]: string,
  'obj': { nested: string, someDoc: SomeDoc }
  'obj.nested': string,
  'obj.someDoc': SomeDoc,
  [`obj.someDoc.${string}`]: any,