Best of TypeScriptDecember 2022

  1. 1
    Article
    Avatar of devtoDEV·3y

    11 Tips That Make You a Better Typescript Programmer

    The most incredible power of the language lies in composing, inferring, and manipulating types. This article will summarize several tips that help you use the language to its full potential. For example, new learners find Typescript’s way of composing types counter-intuitive.

  2. 2
    Article
    Avatar of medium_jsMedium·3y

    Handling errors like a pro in TypeScript

    The correct answer is to narrow the type of error, and we’ll look at how to do that, but why is this even necessary? In JavaScript, just about anything can be thrown: The error that is caught truly is unknown. When the error is caught we can narrow the error type by using Once narrowed, gives us intellisense.

  3. 3
    Article
    Avatar of gcgitconnected·3y

    TypeScript: advanced and esoteric

    In this article, we’ll explore lesser-known features of TypeScript that make it more dynamic. The first part will cover dynamic types that rely on generics to create new types that may look very different from each other, depending on the type arguments they receive. This part will include property accessors, conditional, inferred and recursive types.

  4. 4
    Article
    Avatar of tilThis is Learning·3y

    4 Beginner Friendly Open Source Projects

    I recently launched my Discord server to talk about Open Source and Web Development, feel free to join: https://discord.gg/Gtzcg4sggn Do you like my content? You might consider subscribing to my YouTube channel! You can find it here: Feel free to follow me to get notified when new articles are out.

  5. 5
    Article
    Avatar of asayerasayer·3y

    Top 5 alternatives to Webpack

    Webpack is a free and open-source module bundler for JavaScript applications. It is used to bundle JS files for usage in a web browser, and it can transform front-end assets such as HTML, CSS, and images if corresponding loaders are included. Webpack works by processing your application and internally building a dependency graph.

  6. 6
    Article
    Avatar of newstackThe New Stack·3y

    What TypeScript Brings to Node.js

    Node.js and TypeScript have roots firmly planted in JavaScript, which came from the Java language. Both tools trace their language syntax to Java which James Gosling developed at Sun Microsystems in the 1990s. TypeScript employs static type checking to allow consistent use of variables and reduce a potential source of programming errors.

  7. 7
    Article
    Avatar of logrocketLogRocket·3y

    Web workers, React, and TypeScript

    Web workers are a means for web browsers to run scripts in the background without interfering with the UI. If set up correctly, a web worker can send and receive messages to the JavaScript or TypeScript code where it was set up. We’ll learn how to determine the length, filter, slice, and map through long arrays.

  8. 8
    Article
    Avatar of communityCommunity Picks·3y

    A little about Typescript Utility Types

    TypeScript type system natively provides several "utility types" to help us with some definitions of types. Here, I want to share with you 5 of them. The Pick utility type was developed to generate new types as the result of picking some properties from an existing type.

  9. 9
    Article
    Avatar of hackernoonHacker Noon·3y

    Micro-Frontends: Using TypeScript's Ambient Modules

    Single-spa is a micro-frontend framework. Our project uses webpack externals to treat certain dependencies as in-browser modules. This means to exclude them during build-time and expect the browser to provide them at run-time. Single-Spa provides great documentation on how to achieve this.

  10. 10
    Article
    Avatar of medium_jsMedium·3y

    The power of TypeScript decorators: real cases. Decorating class methods.

    The power of TypeScript decorators: real cases. Decorating class methods. The technology itself can be classified as metaprogramming or declarative programming. Using decorators, we can avoid code duplication by encapsulating a cross-cutting concern in a standalone module.