---
title: "Get Object Keys"
description: "Retrieve the keys of an object in a type-safe manner in TypeScript."
date: "2025-10-02"
tags: ["typescript","object","keys","frontend"]
canonical: "/snippets/typescript/object/object-keys"
---

import { Code } from '@astrojs/starlight/components'
import Source from './object-keys.ts?raw'

# Type safe way to get an object's keys

<Code code={Source} lang="ts" title="object-keys.ts" wrap />
