/// <reference types="lodash"/>
import { Bike } from './cycles';
export function add(a, b) {
if (typeof a === 'number' && typeof b === 'number') {
return a + b;
}
else {
return '' + a + b;
}
}
export const SECRET_STRING = 'shhhhh!';
export { default as Car } from './car';
export { Unicycle, Bike } from './cycles';
/**
* A class that helps with vehicle maintenance
*/
class VehicleUtils {
/**
* Members
*/
memberFn() {
return '';
}
}
// tslint:disable-next-line:no-namespace
(function (VehicleUtils) {
/**
* Create a new bike
*/
function createBike() {
return new Bike();
}
VehicleUtils.createBike = createBike;
})(VehicleUtils || (VehicleUtils = {}));
/**
* The first bike
*/
export const firstBike = VehicleUtils.createBike();
/**
* Create a promise that resolves after a period of time has elapsed
* @param n number of milliseconds to wait
*/
function timeout(n) {
return new Promise(resolve => setTimeout(resolve, n));
}
export const bikeNow = timeout(0).then(() => new Bike());
// Get a bike soon
export const bikeSoon = timeout(3000).then(() => new Bike());
/**
* Get a bike later
*/
export const bikeLater = timeout(10000).then(() => new Bike());