# ts_emit_conflict

> Both a.ts and a.js exist, so emitting a.ts would overwrite a.js.

Both a.ts and a.js exist, so emitting a.ts would overwrite a.js.

| | |
| --- | --- |
| Kind | Build or validation problem |
| Reported by | Source validation (disko publish, disko dev, room hosts) |
| `disko` exit code | 1 (problems) |

Both `a.ts` and `a.js` would end up in the package. TypeScript emits `a.ts` to
`a.js`, which would overwrite the JavaScript file with the same name.

## Wrong

```text
src/rules.ts
src/rules.js   ← also imported
```

## Right

```text
src/rules.ts
src/legacy-rules.js
```

Rename or remove one of the two files, and update the imports.

## See also

- [Project structure & imports](/games/project-structure)
