Skip to content

Instantly share code, notes, and snippets.

View sebgod's full-sized avatar

Sebastian Godelet sebgod

View GitHub Profile
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
/// <reference path="bluebird.d.ts" />
import Promise = require("bluebird");
Promise.cast(8).then(x => console.log(x.toExponential()));
function delayer(time: number) {
var d = Promise.defer();
setTimeout(_ => d.resolve, time);