Variance Annotations in TypeScript, Functional Programming

TypeScript Weekly

Issue #187 — March 31, 2022

Functional Programming in TypeScript

How Haskell knowledge can help you write better TypeScript code in a functional programming style.

Aleksandr Pakulev

Optional Variance Annotations in TypeScript 4.7

The upcoming TypeScript 4.7 release will implement support for variance annotations which will let us mark type parameters as covariant, contravariant, or invariant using the in and out keywords. (If you find the concept of variance confusing, don’t sweat it too much! Variance annotations are definitely a niche feature of the type system.)

Anders Hejlsberg

Strong Types, Weakly Held

John goes over the Type Annotations ECMAScript proposal which adds type annotation syntax (but not type checking) to JavaScript. The proposal recently reached stage 1 of the TC39 process.

John Reilly

How Some TypeScript Utility Types Are Implemented

TypeScript provides various utility types to help us manipulate other types. A walkthrough of how some of these utility types are implemented in the type declaration files that ship with the TypeScript compiler.

Huy

Partners

  • This Week In React: the best of React & React Native news. Sebastien filters the noise, and you save time!
  • ES.next News: learn about the latest in JavaScript and cross-platform tools.
  • Tailwind Weekly: all things Tailwind CSS, new issue every Saturday.

Curated by Marius Schulz
Twitter / Blog / Email

Older messages

Typing Polymorphic Functions, Wordle in the Type System

Monday, March 21, 2022

TypeScript Weekly Issue #186 — March 21, 2022 Type Polymorphic Functions In TypeScript How to statically type functions that behave differently depending on the number and types of their arguments.

TypeScript 4.6, Type Syntax in JavaScript

Thursday, March 10, 2022

TypeScript Weekly Issue #185 — March 10, 2022 Announcing TypeScript 4.6 TypeScript 4.6 is out and ships with various quality-of-life improvements to TypeScript. Most notably, this includes control flow

TypeScript 4.6 RC, Assertion Functions, Type Hierarchy

Sunday, February 27, 2022

TypeScript Weekly Issue #184 — February 27, 2022 Announcing TypeScript 4.6 RC The release candidate of TypeScript 4.6 is out and ships with various quality-of-life improvements to TypeScript. Most

10 Most Popular Posts from 2021

Wednesday, February 9, 2022

TypeScript Weekly Issue #183 — February 6, 2022 Hi there! 👋 This is the first issue of TypeScript Weekly in 2022. Welcome back if you've been with us last year already, and welcome aboard if you

Function Overloads, Control Flow Analysis, Type | Treat

Friday, December 10, 2021

TypeScript Weekly Issue #182 — December 9, 2021 Get the Best of TypeScript Control Flow Analysis This article will show some simple type construction patterns, code writing habits, and compiler options

You Might Also Like

Tesla Autopilot investigation closed

Friday, April 26, 2024

Inside the IBM-HashiCorp deal and Thoma Bravo takes another company private View this email online in your browser By Christine Hall Friday, April 26, 2024 Good afternoon, and welcome to TechCrunch PM.

Microsoft's and Google's bet on AI is paying off - Weekly News Roundup - Issue #464

Friday, April 26, 2024

Plus: AI-controlled F-16 has been dogfighting with humans; Grok-1.5 Vision; BionicBee; Microsoft's AI generates realistic deepfakes from a single photo; and more! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

🤓 The Meta Quest Might Be the VR Steam Deck Soon — Games to Play After Finishing Wordle

Friday, April 26, 2024

Also: Why a Cheap Soundbar Is Better Than Nothing, and More! How-To Geek Logo April 26, 2024 Did You Know TMI: Rhinotillexomania is the medical term for obsessive nose picking. 🖥️ Get Those Updates

JSK Daily for Apr 26, 2024

Friday, April 26, 2024

JSK Daily for Apr 26, 2024 View this email in your browser A community curated daily e-mail of JavaScript news A Solid primer on Signals with Ryan Carniato (JS Party #320) Ryan Carniato joins Amal

So are we banning TikTok or what?

Friday, April 26, 2024

Also: Can an influencer really tank an $800M company? View this email online in your browser By Haje Jan Kamps Friday, April 26, 2024 Image Credits: Jonathan Raa/NurPhoto / Getty Images Welcome to

[AI Incubator] 300+ people are already in. Enrollment closes tonight at 11:59pm PT.

Friday, April 26, 2024

How to decide if you're ready. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Daily Coding Problem: Problem #1423 [Medium]

Friday, April 26, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. You are given an array of nonnegative integers. Let's say you start at the

Data science for Product Managers

Friday, April 26, 2024

Crucial resources to empower you with data that matters. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Inner Thoughts

Friday, April 26, 2024

'The Inner Circle' Comes Around... Inner Thoughts By MG Siegler • 26 Apr 2024 View in browser View in browser If you'll allow me a brief meta blurb this week (not a Meta blurb, plenty of

Digest #135: Kubernetes Hacks, Terraform CI/CD, HashiCorp Acquisition, AWS Data Transfer Monitoring

Friday, April 26, 2024

Explore Advanced Kubernetes Techniques, Dive Into Terraform CI/CD Frameworks, Monitor AWS Data Transfer, and Explore Cloud Security with Gitleaks! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏