> For the complete documentation index, see [llms.txt](https://type.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://type.angular-package.dev/type-draft/helper/typeof.md).

# typeOf()

## `typeOf()`

Gets the specific object type of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) value.

{% code title="type-of.func.ts" %}

```typescript
const typeOf = (value: any): string =>
  Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
```

{% endcode %}

{% embed url="<https://github.com/angular-package/type/blob/main/src/lib/type-of.func.ts>" %}

### Parameters

#### `value: any`

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to obtain its [`object` class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString#using_tostring_to_detect_object_class) name.

### Returns

The **return value** is the [`object` class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString#using_tostring_to_detect_object_class) name of the given [`value`](#value-any).

## Example usage

```typescript
// Example usage.
import { typeOf } from '@angular-package/type';


```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://type.angular-package.dev/type-draft/helper/typeof.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
