Learning TypeScript 0x3 Object Oriented Programming

SOLID Principles Single Responsibility Principle (SRP): Components (functions, classes, modules) must focus on a single task Open/Close Principle (OCP): Consider scalability when designing, but modify the original code at least when extending Richter Replacement Principle (LSP): Any class in a pr ...

Posted on Sun, 16 Feb 2020 21:37:32 -0500 by Lumio

Wangcai bookkeeping project - Implementation of Money.vue component

1. Implement the Vue component of TypeScript. Take Types component as an example to rewrite JS writing <template> <div> <ul class="types"> <li :class="type === '-' && 'selected'" @click="selectType('-')">expenditure</li> <li :class="type === '+' && 'selected'" @cl ...

Posted on Fri, 07 Feb 2020 07:02:29 -0500 by angelkay73

Using typescript to transform koa development framework

Original address: Using typescript to transform koa development framework Strong TypeScript development experience and maintenance projects have obvious advantages over JavaScript, so it is necessary to transform the commonly used scaffolds. Next, we start to transform the node back-end scaffold based on the koa framework: The construction of ...

Posted on Tue, 04 Feb 2020 03:00:08 -0500 by anakadote

TypeScript True Fragrance Series-Classes

Preface The content of TypeScript fragrance series will be referenced Chinese Documents However, the examples in this paper will not duplicate those in the document, and will be studied in some places.In addition, the results of some of the examples in this article are compiled into JavaScript without ...

Posted on Mon, 27 Jan 2020 21:44:16 -0500 by JesuZ

The implementation of Vue data response system based on ES6 agent model

The implementation of Vue data response system based on ES6 agent model 1. Tool preparation The required environment is as follows: Node environment (babel) TypeScript Knowledge reserve needed: Introduction to ES6 standard 2. way of thinking 2.1 overall structure The overall structure of the ...

Posted on Sat, 18 Jan 2020 07:22:30 -0500 by ethan6

Talk about magic disappearance UI framework Svelte

Recently, based on the business needs of the company, a browser plug-in may be developed. After investigation, we found that plug-in UI development is essentially a development page.So I started looking for a very small, very fast new toy (tool).After all, no matter which of the three front-end frameworks develops the browser plug-in, it is no ...

Posted on Sat, 04 Jan 2020 11:32:56 -0500 by fiddlehead_cons

An article takes you to the String Class for basic algorithms in JavaScript

Author| Jeskson Source|Dada Front End Bistro 1 What can an algorithm do?What improves?What are the benefits? Front-end students need to improve the core programming work, establish and improve the algorithm knowledge system, basic algorithms, data structures, advanced algorithms, from shallow to deep explanation, a thorough understanding of ...

Posted on Sun, 29 Dec 2019 20:12:59 -0500 by dervaish

The polymorphic this type of advanced type in TypeScript Foundation

Forwarding The polymorphic this type of advanced type in TypeScript Foundation Advanced type Polymorphic this type A polymorphic this type represents a subtype that contains a class or interface. This is called the f-bound polymorphism. It can easily represent the inheritance between coherent interfaces, for example. In the following examp ...

Posted on Fri, 27 Dec 2019 15:41:11 -0500 by sam_rich

Decorator+Typescript: Decorate your code

Preface Summary of original articles: github/Nealyang I'm working on a Typescript article for THE LAST TIME series, and Decorator has always been a very good facet solution for me personally.The so-called facet scheme is what we often call facet programming AOP.A programming idea, a simple and straightforward explanation, is that at run time, ...

Posted on Thu, 26 Dec 2019 22:09:55 -0500 by jkewlo

Dojo international advanced

Dojo website: https://dojo.io Use message package Dojo's message package concept is a Map object, which stores text messages identified by key, and the message content identified by each key can be expressed in one or more languages. When a message needs to be displayed to the end user, the Dojo application uses the key to reference the message ...

Posted on Sun, 22 Dec 2019 04:03:50 -0500 by sfw5000