An easy to understand introduction to TypeScript

This article comprehensively introduces the common knowledge points of TypeScript, which is especially friendly for new beginners! This article will take you step by step to learn 14 knowledge points related to the introduction of TypeScript. See the following figure for a detailed outline: 1, What i ...

Posted on Sun, 07 Jun 2020 03:13:07 -0700 by begeiste

Use Taro to make a wechat applet Todo, beginner's work record

Wechat applet framework: Taro To build a framework for wechat applets, there are several mainstream ones: Official WePY: https://tencent.github.io/wepy/document.html#/ mpvue of meituan: http://mpvue.com/mpvue/#-html Taro of Jingdong: https://taro.aotu.io/ The first two are Vue style, Taro is React In order to learn, this article us ...

Posted on Mon, 20 Apr 2020 23:01:52 -0700 by toms

Typescript learning record interface

Attribute type interface Interface describing object properties On Interface To restrict the properties of an object, you can use {} directly, but it is not convenient to reuse //Here {firstName: string} is used to restrict the type of name function printName(name: { firstName: string }) { ...

Posted on Sun, 15 Mar 2020 02:43:53 -0700 by tbobker

How to implement class constants in typescript?

In TypeScript, the const keyword cannot be used to declare class properties. Doing so causes a compiler error, "class members cannot have the 'const' keyword." I found myself needing to make it clear in my code that I shouldn't change properties. If I try to assign a new value to a property after it has been declared, I hope the I ...

Posted on Tue, 03 Mar 2020 23:19:44 -0800 by brian79

TypeScript fragrance series - Enumeration

Preface The contents of TypeScript fragrance series will refer to Chinese document , but the examples in this paper will not be the same as those in the document, and some places will be studied in depth. In addition, the results of some examples are compiled into JavaScript after the code has no erro ...

Posted on Wed, 05 Feb 2020 21:01:13 -0800 by mikewooten

The simplest configuration of react routing

Preface vue has written a lot. I want to know more about react. In addition, we all say that typescript is very fragrant. So write a small demo project with react + typescript. Because the main purpose of the project is to practice the cooperative use of various technologies, so the implementation of ...

Posted on Fri, 17 Jan 2020 04:13:38 -0800 by GESmithPhoto

The first way to learn TypeScript: installation, basic type, variable declaration, operator and conditional statement

1: Install TypeScript There are two main ways to get TypeScript tools: Through npm (Node.js package manager) Install TypeScript plug-in for Visual Studio For users using npm: > npm install -g typescript For Visual Studio users 1, Download Visual Studio Code. 2: click the code file edite ...

Posted on Mon, 13 Jan 2020 02:46:11 -0800 by musicdirector

Vue Cli3 create project

Vue Cli3 create project Vue,Markdown 1. installation npm install -g @vue/cli 2. Create a project vue create iview-admin # OR vue ui default (babel, eslint) default package, which provides babel and eslint support. Manually select features to select the required functions and provide more feature selection. For example, if you want to support ...

Posted on Sun, 15 Dec 2019 11:08:20 -0800 by superhaggis

TypeScript Writing Vue Project Structure Resolution

Writing a Vue project using TypeScript has been a while ago, and I was confused when I just used TypeScript. I don't know where to start. Writing projects using TypeScript is cumbersome and not as flexible as JavaScript, because TypeScript has too many restrictions on code and throws an unexpected error from time to time during the process.This ...

Posted on Fri, 13 Dec 2019 20:07:46 -0800 by Ellen67

JS/TS language zip compression decompression tripartite library and its use

In the Laya project, the configuration files written to AS3 by typescript are used to compress the files exported by the packaging tool.What to do? Go to github and find a library. The address is as followshttps://github.com/imaya/zlib.js Download the zlib.js or zlib.min.js file foundWrite zlib.min.d.ts file by yourself. The code is as follows ...

Posted on Wed, 27 Nov 2019 08:35:03 -0800 by sstangle73