UNPKG

@povio/openapi-codegen-cli

Version:

**NOTE:** This CLI tool is primarily designed for use within our organization. The generated code output aligns with our internal template. If you are using this tool without our internal template, make sure to use it in **standalone** mode.

14 lines (13 loc) 818 B
import { Get } from "type-fest"; import { HasNestedPath, ObjectLiteral } from "src/generators/types/common"; /** Get a nested property value from a dot-delimited path. */ export declare function getNested<Path extends string, From extends ObjectLiteral, Return = HasNestedPath<Path> extends 1 ? From[Path] : Get<From, Path>>(obj: From, path: Path): Return; /** Pick given properties in object */ export declare function pick<T extends ObjectLiteral, K extends keyof T>(obj: T, paths: K[]): Pick<T, K>; /** * Deep merge two or more objects/arrays recursively. * Arrays are concatenated, objects are merged recursively. * Later arguments take precedence over earlier ones. * Returns a new object/array without mutating the originals. */ export declare function deepMerge<T>(source: T, ...sources: Partial<T>[]): T;