How to call a Typescript function?

I have a question about this function in TypeScript. How can i call this function?

type Fish = { swim: () => void };
type Bird = { fly: () => void };
 
function move(animal: Fish | Bird) {
  if ("swim" in animal) {
    return animal.swim();
  }
 
  return animal.fly();
}

I tried for example this

move(Fish)

or this

move(swim)

But everything gives me an error.

Answer

Fish and Bird are types, you can’t pass types as arguments ..

what you should do is create a variable of that type and then call it

Ex:

let animal : Fish = { 
           swim: () => {
               console.log("I swim");
           }
 }
 move(animal);