---
title: "isConsoleMethod(): function in Console, TypeShade API"
description: "isConsoleMethod, a function in Console. Whether name is one of the console methods the source compiler lowers, narrowing it to ConsoleMethod."
url: https://typeshade.dev/api/isconsolemethod/
language: en
---

# `isConsoleMethod()`

Function in Console

Whether name is one of the console methods the source compiler lowers, narrowing it to ConsoleMethod.

`import { isConsoleMethod } from 'typeshade'`

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

## Syntax

```ts
function isConsoleMethod(name: string): name is ConsoleMethod
```

## Parameters

**`name` `string`**

## Return value

`name is ConsoleMethod`

## Description

The front end asks this for every `console.<name>(...)` it meets, and refuses the rest by name rather than inventing a TypeShade console of its own.

## See also

- [`ConsoleMethod`](https://typeshade.dev/api/consolemethod/)

## Source

[`src/core/console.ts`, line 116](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/console.ts#L116), at commit af54ddad5
