I'm starting with TypeScript, and I'm currently following TypeScript in 5 minutes . I get a strange warning in Visual Studio Code when I greeter over the name of the greeter function, as shown in the image below. A warning:
[ts] Implementation of duplicate functions.
Function greeter (person: Person): string (+1 overload)

But there is no other implementation of this unique function in my single file! When I run tsc greeter.ts everything works fine and a js file is created.
Full greeter.ts file:
interface Person { firstName: string; lastName: string; } function greeter(person: Person) { return "Hello, " + person.firstName + " " + person.lastName; } var user = { firstName: "Jane", lastName: "User" }; console.log(greeter(user));
Why am I getting this warning? How to solve it? I have addressed this issue , but I believe that it is not related.
javascript typescript
Bruno peres
source share