Skip to main content

Home > lib > Animal

Animal interface

An interface to define an animal

Signature:

export interface Animal 

Example

Here's a simple example:

class Cow implements Animal {
speak() {
return 'mooo';
}
}

Methods

MethodDescription
speak()