@karmaniverous/smoz
    Preparing search index...

    Function splitKeysBySchema

    • Partition a union of env keys by which schema defines each key.

      Type Parameters

      • G extends ZodObject<
            Readonly<
                {
                    [k: string]: $ZodType<
                        unknown,
                        unknown,
                        $ZodTypeInternals<unknown, unknown>,
                    >;
                },
            >,
            $strip,
        >

        global params Zod object schema

      • S extends ZodObject<
            Readonly<
                {
                    [k: string]: $ZodType<
                        unknown,
                        unknown,
                        $ZodTypeInternals<unknown, unknown>,
                    >;
                },
            >,
            $strip,
        >

        stage params Zod object schema

      Parameters

      • allKeys: ReadonlySet<PropertyKey>

        union set from deriveAllKeys

      • globalParamsSchema: G

        global schema

      • stageParamsSchema: S

        stage schema

      Returns {
          globalPick: readonly (keyof output<G>)[];
          stagePick: readonly (keyof output<S>)[];
      }

      lists of keys to pick from each schema