export function get()

in packages/sdk/src/Value.ts [154:167]


  export function get(struct: Struct | undefined, ...parts: string[]): Value {
    let value: Value = struct;
    const errorPath: string[] = [];
    /* eslint-disable no-loop-func */
    for (const step of parts.flatMap(part => part.split('.'))) {
      TypeMismatchError.hoist(errorPath, () => {
        assertType('Struct', value);
        value = value[step];
        errorPath.push(step);
      });
    }
    /* eslint-enable no-loop-func */
    return value;
  }