---
title: "SD0113: an error code of the TypeShade compiler"
description: "SD0113, an error code of the TypeShade compiler. a fn whose body returns nothing at the TypeScript level returns a value at run time"
url: https://typeshade.dev/reference/errors/sd0113/
language: en
---

# `SD0113`

Core code

a fn whose body returns nothing at the TypeScript level returns a value at run time

No `"use typeshade"` program on this site raises this code, so the page has no example. The [`fn()`](https://typeshade.dev/api/fn/) builder builds the IR directly and reaches the check at the lines under Source.

The registry text and every compiler message on these pages are the compiler's own English.

## When it fires

The void-body overload's runtime half.

The overload that lets a void body drop `voidT` pins the handle's key to `'void'` at the type level. TypeScript reads a body that sends its value out through an ambient Return() as returning nothing too, so the type level cannot separate the two; SD0113 is the runtime half that keeps `'void'` from ever being a lie.

## How to fix it

The registry's hint: name the return type in the fn() call — fn(name, params, <type>, body) — so the handle carries the key its callers need

## See also

- [The `fn()` builder](https://typeshade.dev/api/fn/)
- [`TypeShadeError`](https://typeshade.dev/api/typeshadeerror/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

Where the compiler raises this code at commit af54ddad5, one line per file:

- [`src/core/ir/builder.ts:541`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/builder.ts#L541)
