mini-effect
    Preparing search index...

    Function flatten

    • Flatten the error messages of issues.

      Parameters

      Returns {
          nested?: { readonly [key: string]: [string, ...string[]] | undefined };
          other?: [string, ...string[]];
          root?: [string, ...string[]];
      }

      A flat error object.

      • Optional Readonlynested?: { readonly [key: string]: [string, ...string[]] | undefined }

        The nested errors.

        Hint: The error messages of issues with a path that belong to the nested parts of the schema and can be converted to a dot path are added to this key.

      • Optional Readonlyother?: [string, ...string[]]

        The other errors.

        Hint: Some issue paths, for example for complex data types like Set and Map, have no key or a key that cannot be converted to a dot path. These error messages are added to this key.

      • Optional Readonlyroot?: [string, ...string[]]

        The root errors.

        Hint: The error messages of issues without a path that belong to the root of the schema are added to this key.

    • Flatten the error messages of issues.

      Type Parameters

      Parameters

      Returns {
          nested?: {
              [TKey in string]: Readonly<
                  Partial<
                      Record<
                          TSchema extends | BaseSchema<unknown, unknown, BaseIssue<(...)>>
                          | BaseSchemaAsync<unknown, unknown, BaseIssue<(...)>>
                              ? IssueDotPath<TSchema<TSchema>>
                              : string,
                          [string, ...string[]],
                      >,
                  >,
              >[TKey]
          };
          other?: [string, ...string[]];
          root?: [string, ...string[]];
      }

      A flat error object.

      • Optional Readonlynested?: {
            [TKey in string]: Readonly<
                Partial<
                    Record<
                        TSchema extends | BaseSchema<unknown, unknown, BaseIssue<(...)>>
                        | BaseSchemaAsync<unknown, unknown, BaseIssue<(...)>>
                            ? IssueDotPath<TSchema<TSchema>>
                            : string,
                        [string, ...string[]],
                    >,
                >,
            >[TKey]
        }

        The nested errors.

        Hint: The error messages of issues with a path that belong to the nested parts of the schema and can be converted to a dot path are added to this key.

      • Optional Readonlyother?: [string, ...string[]]

        The other errors.

        Hint: Some issue paths, for example for complex data types like Set and Map, have no key or a key that cannot be converted to a dot path. These error messages are added to this key.

      • Optional Readonlyroot?: [string, ...string[]]

        The root errors.

        Hint: The error messages of issues without a path that belong to the root of the schema are added to this key.