logo

Crowdly

Browser

Add to Chrome

A developer is writing a TypeScript function setLeftPadding that should accept a...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

A developer is writing a TypeScript function setLeftPadding that should accept a value parameter that can be either a string (e.g., `"100px"`) or a number (e.g., `100`). Which TypeScript feature should be used to precisely model this requirement in the function's type annotation?

More questions like this

Want instant access to all verified answers on learning.monash.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome