An opinionated piece in favor of Typescript. Answers what Typescript isn’t supposed to do, what it does do and what could be improved!

If anything this is my indirect response to that and just one more developer’s attempt to set Typescript’s name straight, as in my personal experience…




Originally written during my Ten Cities in Ten Days solo trip back in April 2016.


const getUser = (id) => {
return httpClient.get('https://facebook.com/user/' + id)
.then((response) => {
// Side Effects Logic
return cacheData(response);
})
.then((response) => parseUserResponse(response))
.then((user) => {
// more side effects on the User Data now
updateLocalDatabase(user);
return user;
})
then((user => {
// even more side effects
refreshUserCreditCards(user);
return user;
});
}

const cacheData = (response) => {
cacheStore.put('user', response);


As I promised to myself, at the end of each day I’ll be putting my thoughts down on the paper, in an attempt to eternalize the feelings and emotions conveyed by each city.


This is a story I’m writing while riding the train to and from work. If you have something to say please do. If you think it sucks please tell me why. Thank you!


Gabriel C. Troia

99% Human. 1% Humor.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store