> For the complete documentation index, see [llms.txt](https://docs.tsafe.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tsafe.dev/objectfromentries.md).

# objectFromEntries

Functionally identical to `Object.fromEntries()` but instead of returning but its return type more precise than just `{ [k: sting]: any; }`.

```typescript
import { assert, type Equals, objectFromEntries } from "tsafe";

const entries = [
	["a", "foo"],
	["b", 33],
	["c", true as boolean],
] as const;

const obj = objectFromEntries(entries);
//    ^ obj is of type { a: "foo"; b: 33; c: boolean; }

assert<
	Equals<
		typeof obj,
		{
			a: "foo";
			b: 33;
			c: boolean;
		}
	>
>;
```
