typedash
Version:
modern, type-safe collection of utility functions
14 lines • 496 B
text/typescript
//#region src/functions/toObject/toObject.d.ts
/**
* Converts an array of strings to an object with the same values as keys and values.
* @param array The array to convert to an object.
* @returns An object with the same values as keys and values.
* @example
* ```ts
* toObject(['a', 'b']) // { a: 'a', b: 'b' }
* ```
*/
declare function toObject<T extends string>(array: readonly T[]): Record<T, T>;
//#endregion
export { toObject as t };
//# sourceMappingURL=toObject-AMOsaxQG.d.cts.map