🚀 Under Development - We're building something amazing!
Powered by Spaced Repetition

Turn Notion Databases
into Flashcards

Connect your Notion workspace and instantly create powerful flashcards. Study smarter with spaced repetition powered by your own notes.

N
A
M
S

Join 1500+ learners using Notion for flashcards

TypeScript Fundamentals

Progress1 / 3
Question
What is the difference between calling and assigning a function in TypeScript?
Click or press Space to reveal
Answer

Calling a function: argument can be narrower, result can be widened.

Assigning a function: _parameter types go "the opposite way" (contravariance), return types go "the same way" (covariance).

Exercise Link

type Entity = Deal | Lead

type Processor<Input extends Entity, Output extends Entity> = (input: Input) => Output;

How well did you know this?

Space Flip1-4 RateEsc Exit