# TS8017: Signature declarations can only be used in TypeScript files.

> A function declaration without a body (an overload signature) appears in a JavaScript file. Remove it.

## What it means

Overload signatures, function declarations with no body, are TypeScript syntax and can't
appear in a `.js` file.

ts-r's parser reports this code when it reads `.js` files with tsc's rules for TypeScript syntax in JavaScript. `ts-r-check` doesn't report it yet: today it parses `.js` files with the plain JavaScript grammar and reports a syntax error at the same place instead.

## Example

```js
function parse(input);
function parse(input) {
  return input;
}
```

## How to fix

- Remove the signature; JSDoc's `@overload` tag can describe overloads in JavaScript.
- Rename the file to `.ts` if it's meant to be TypeScript.

Source: https://ts-r.dev/errors/TS8017/
