---
title: "ElemKey: type in Types, TypeShade API reference"
description: "ElemKey, a type in Types. Element key of a vector key; identity for scalars."
url: https://typeshade.dev/api/elemkey/
language: en
---

# `ElemKey`

Type in Types

Element key of a vector key; identity for scalars.

`import type { ElemKey } from 'typeshade'`
`import type { ElemKey } from 'typeshade/core/ir'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
type ElemKey<K extends string> = K extends `vec${number}<${infer E}>` ? E : K;
```

## Source

[`src/core/ir/types/key-of.ts`, line 60](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/types/key-of.ts#L60), at commit af54ddad5
