Tag:literal

  • These six new TS features are often used, and I can’t live without them anymore!

    Time:2022-7-2

    Dream, dry goods, wechat search[move to the world]Pay attention to this dish washing wisdom who is still washing dishes in the early morning. This article GitHubhttps://github.com/qq449245884/xiaozhiIt has been included, and there are complete test sites, materials and my series of articles for the interview of front-line big factories. Today, let’s introduce some new functions and […]

  • Keyof type operator of typescript

    Time:2022-5-15

    preface The official documents of typescript have long been updated, but the Chinese documents I can find are still in the older version. Therefore, some newly added and revised chapters are translated and sorted out. This article is compiled from “typescript Handbook”Keyof Type Operator“Chapter. This article is not translated strictly according to the original text, […]

  • Indexed access types of typescript

    Time:2022-5-8

    preface The official documents of typescript have long been updated, but the Chinese documents I can find are still in the older version. Therefore, some newly added and revised chapters are translated and sorted out. This article is compiled from “typescript Handbook”Indexed Access Types“Chapter. This article is not translated strictly according to the original text, […]

  • JavaScript notes 0

    Time:2022-4-29

    JavaScript notes 0 Reference books: Javascript authoritative guide, JavaScript advanced programming Lexical Structure 1. Case sensitive 2. Notes Single-Line Comments //This is a line of comment /*Both are acceptable*/ Multiline comment (cannot be nested) /* ABBA ABBA */ 3. Identifier An identifier is the name of a variable, function, property, or function parameter Must start […]

  • Common types of typescript (Part 2)

    Time:2022-4-24

    The official documents of typescript have long been updated, but the Chinese documents I can find are still in the older version. Therefore, some newly added and revised chapters are translated and sorted out. This translation is compiled from “typescript Handbook”Everyday Types“Chapter. This article is not translated strictly according to the original text, and some […]

  • Typescript official manual translation plan [Xi]: type control – template literal type

    Time:2022-4-22

    explain: 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: […]

  • Rust macro_ Getting started with rules

    Time:2022-4-21

    Rust macro_ Getting started with rules This paper expounds the related problems in rust languagemacro_rulesBasic knowledge of. If you know nothing about macros, after reading this article, you will have a basic understanding of rust’s macros, and you can also understand the writing of some macros; But if you need to write your own feature […]

  • These six new TS features are often used. After using them, I can’t live without them anymore!

    Time:2022-4-16

    Dream, dry goods, wechat search[move to the world]Pay attention to this dish brushing wisdom who is still doing dishes in the early morning. This article GitHubhttps://github.com/qq449245884/xiaozhiIt has been included. There are complete test sites, materials and my series of articles for the interview of front-line large factories. Today, let’s introduce some new functions and progress […]

  • What is undefined

    Time:2022-4-16

    The undefined (which is not literal) we write in JavaScript code is not the undefined value itself It is a local variable or an attribute of a global object But most of the time their value is undefinedThe same goes for Nan and infinity window. undefined === undefined; // Undefined is a global variable // […]

  • Typescript template literal type

    Time:2022-4-15

    The official documents of typescript have long been updated, but the Chinese documents I can find are still in the older version. Therefore, some newly added and revised chapters are translated and sorted out. This translation is compiled from “typescript Handbook”Template Literal Types“Chapter. This article is not translated strictly according to the original text, and […]

  • About JS prototype syntax

    Time:2022-3-13

    Prototype grammar function Student(name,id){ this.name = name; this.id = id; } //Gets the prototype of the object Student.prototype.type = “student”; Student.prototype.message = function(){ console.log(this.name + “,” + this.id); }; //Generate instance object var student1 = new Student(“li”,111); Directly use an object literal to assign a value to the prototype object Student.prototype = { type : […]

  • ECMAScript

    Time:2022-3-3

    String extension method: const message = ‘Error:foo is not defined .’; console.log( // message.startsWith(‘Error’) // message.endsWith(‘.’) message.includes(‘foo’) ) Literal enhancement of object:You can enter any variable or expression in [] to set the property name of the object The set data structure is a collection and cannot be duplicated const s = new Set(); s.add(1).add(2).add(3) […]