/**
* Add two numbers
* @param a a number
* @param b a number
*
* @public
*/
export function add(a: number, b: number): number;
export function add(a: string, b: string): string;
export function add(a: number | string, b: number | string): number | string {
if (typeof a === 'number' && typeof b === 'number') {
return a + b;
} else {
return '' + a + b;
}
}
/**
* A super secret string
* @public
*/
export const SECRET_STRING: string = 'shhhhh!';
/**
* A vehicle is a thing that goes places
*/
class Vehicle {
/**
* Create a new vehicle
* @param {number} numWheels Number of wheels
*/
constructor(protected numWheels: number) {}
/**
* Drive the vehicle
* @returns {string}
*/
public drive() {
return `Driving with all ${this.numWheels} wheels`;
}
}
/**
* A car is a 4-wheeled vehicle
*/