Typescript Asynchronous Programming Paradigm Await/Async Deferred/Promise
How can we gracefully implement asynchronous programming in Typescript programming?
Write the upper logic with Await/Async and encapsulate the callback function with Deferred/Promise.
Let's first look at a piece of code in the actual working environment:
This code implements the function of uploading local files or f ...
Posted by ctimmer on Tue, 01 Jan 2019 19:30:09 -0800
VS Code Torture - (10) You want to publish your own tricky snippets to the VSCode plug-in market!
Preface
Take advantage of the free time on Saturday to learn about the release routine of the next vscode plug-in or code snippet.
Originally, I found out what GG articles had been written by predecessors. At last, it seemed that there were no articles, so I had to grope for them by myself.
Start with the official do ...
Posted by cutups on Tue, 25 Dec 2018 00:42:06 -0800
Open source widget - swagger API Access Code Generator (js/typescript)
Nowadays, front-end and back-end separation is popular. Back-end usually uses swagger to generate api documents and provide them to front-end colleagues for invocation. Generally, front-end is to view this document and write invocation code according to the document description. In fact, swagger has provided enough descriptive information, we c ...
Posted by badapple on Sat, 15 Dec 2018 06:24:03 -0800
Eloquent JavaScript Notes 11: A Programming Language
1. Egg language example
do(define(x, 10),
if(>(x, 5),
print("large"),
print("small")))Equivalent to js code:
x = 10;
if(x>5)
print("large");
else
print("small");
1. Parser
Read a piece of code and convert it into a data structure, which can accurately reflect the program structure of the code.
Everything i ...
Posted by stylezeca on Thu, 13 Dec 2018 07:06:06 -0800