TS2393: Duplicate function implementation TypeScript Origin: On your device Last updated 5 Nov 2026

TypeScript: error TS2393: Duplicate function implementation.

A function with the same name/signature is implemented more than once in the same scope.

Exact message you may see error TS2393: Duplicate function implementation.TS2393: Duplicate function implementationts(2393) Duplicate function implementationerror TS2393 Duplicate function implementation
Seen on: TypeScript

Meaning

Remove one implementation or use overloads correctly (multiple signatures followed by a single implementation). Often caused by two script (non-module) files declaring the same global function, or duplicated code from merges. Make files modules with export {}.

Common causes

  • Duplicate function definitions
  • Two global script files with the same function
  • Overload signatures each with a body
  • Merge conflict leftovers
  • Copy-paste

⚡ Quick fix

  1. Keep one implementation
  2. Overloads: signatures only, then one implementation
  3. Add export {} to turn scripts into modules

Detailed fix by platform

TypeScript

  1. function f(a: string): string; function f(a: number): number; function f(a: any) { return a; }

How to diagnose

  1. Duplicates — Where?
  2. Overloads — Single impl?
  3. Files — Modules?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Cannot find module './App.vue' or its corresponding type declarations — TypeScript: error TS2307: Cannot find module './App.vue' or its corresponding type declarations. (Vue)Cannot find module '.…TS1005: ';' expected / ',' expected (syntax error) — TypeScript: error TS1005: ';' expected. (TypeScript)TS1005: ';' expected …TS2300: Duplicate identifier — TypeScript: error TS2300: Duplicate identifier 'Foo'. (TypeScript)TS2300: Duplicate ide…TS2349: This expression is not callable — TypeScript: error TS2349: This expression is not callable. Type 'X' has no call signatures. (TypeScript)TS2349: This expressi…TS2366: Function lacks ending return statement — TypeScript: error TS2366: Function lacks ending return statement and return type does not include 'undefined'. (TypeScript)TS2366: Function lack…TS2451: Cannot redeclare block-scoped variable — TypeScript: error TS2451: Cannot redeclare block-scoped variable 'name'. (TypeScript)TS2451: Cannot redecl…TS2554: Expected N arguments, but got M — TypeScript: error TS2554: Expected 2 arguments, but got 1. (TypeScript)TS2554: Expected N ar…TS2769: No overload matches this call — TypeScript: error TS2769: No overload matches this call. Overload 1 of 2, '(a: string): void', gave the following error. (TypeScript)TS2769: No overload m…TS2393: D…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.