js learning experience

js learning notes: 1, Data type: (1) Type conversion 1. Implicit conversion 1. Convert numeric + character type to character type console.log(12 + 'character');//string type, output: 12 characters console.log('12' + 1);//Output 121 2. In case of - * / etc., it is generally converted to numerical type console.log('12' - 1);//number t ...

Posted by bastien on Fri, 24 Dec 2021 08:01:57 +0100

Cocos Creator-4. Listen, launch event, node system event, global system event

preface Next, learn to monitor and launch events, node system events, and so on!! Recommended as usual Official website 1, Introduction Monitor and launch events Event processing is completed in the node (cc.Node). For components, you can register and listen to events by accessing the node this.node. Listening events can be registered ...

Posted by chrischen on Fri, 24 Dec 2021 02:24:59 +0100

TypeScript の 7 starting from 0: function

introduce Functions are the foundation of JavaScript applications. It helps you implement abstraction layers, simulation classes, information hiding and modules. It is also a first-class citizen in JavaScript. In TypeScript, although classes, namespaces and modules are supported, functions are still the main place to define behavior. Ty ...

Posted by gigantorTRON on Wed, 22 Dec 2021 03:13:38 +0100

TypeScript basic data type

TypeScript: basic data type Declare a variable in typescript and specify its type. In future use, the value of the variable can only be this type String type The string in ts can also use back quotation marks. The usage is the same as js let a: string = "aaa"; Number type The number type supports decimal, hexadecimal, binary and octa ...

Posted by shab620 on Tue, 21 Dec 2021 17:28:53 +0100

React+Redux+Ant Design+TypeScript e-commerce practice - server application 06 Order Management api and other APIs

Create order Schema // models\order.js const mongoose = require('mongoose') const Product = require('./product') const Category = require('./category') // Create snapshot type // Clone product Schema const snapshotProductSchema = Product.schema.clone() // Clone classification Schema const snapshopCategorySchema = Category.schema.clone() // De ...

Posted by Lee-Bartlett on Sat, 18 Dec 2021 19:51:06 +0100

[secure TypeScript] interface

Hello, I'm A bowl week , a front end that doesn't want to be drunk. If you are lucky enough to get your favor, I am very lucky~ Write in front One of the core principles of TS is to check the type of structure. The function of interfaces is to name these types and define contracts for your code or third-party code. Finally, it is compiled ...

Posted by bobbythenewb on Thu, 16 Dec 2021 01:21:00 +0100

TypeScript type security

prefaceThere are many places in TypeScript that involve the concepts of subtype, supertype, Covariant, Contravariant, bidirectional Covariant and Invariant. If you don't understand these concepts, you may be reported as wrong and have no way to start, or you can see others write like this when writing some complex types, But I don't know why.ex ...

Posted by gordonmc on Mon, 13 Dec 2021 03:05:34 +0100

TypeScript function overload writing method, which layer are you on!

Author: Dmitri pavlutinTranslator: front end XiaozhiSource: dmitripavlutinThere are dreams and dry goods. Wechat search [Daqian world] pays attention to this bowl washing wisdom who is still washing dishes in the early morning.This article GitHub https://github.com/qq449245884/xiaozhi It has been included. There are complete test sites, materi ...

Posted by bilis_money on Mon, 13 Dec 2021 01:04:40 +0100

Using vuex in vue3

Vuex is widely used in medium and large-scale projects. Generally, the data used globally is placed in vuex to facilitate the use of other pages. In the project, most of the data stored in vuex is related to user_id, permission and other related information, so how to use vuex in vue3? With this problem, in this article, let's analyze it togeth ...

Posted by marschen on Thu, 09 Dec 2021 17:01:29 +0100

TypeScript official manual translation plan [12]: Category

Note: at present, there is no Chinese translation of the latest official documents of TypeScript on the Internet, so there is such a translation plan. Because I am also a beginner of TypeScript, I can't guarantee the 100% accuracy of translation. If there are errors, please point them out in the comment area;Translation content: the tentative t ...

Posted by PJNEW on Thu, 09 Dec 2021 12:57:36 +0100