TypeScript
by AlexandrAbakumov
HTML
<div id="app"></div>
CSS
body {
background: #20262E;
padding: 20px;
font-family: Helvetica;
}
#app {
background: #fff;
border-radius: 4px;
padding: 20px;
transition: all 0.2s;
text-align: center;
}
TypeScript
interface ITest {
test: string;
}
new Promise(function(res, rej) {
res({ test: "aaa"});
})
.then(function(result) {
return { test: "bbb"};
})
.then(function(result) {
document.querySelector("#app").innerHTML = "Result: " + result.test;
//console.log(result);
});