TypeScript Quiz_type aliases, union type, intersection type, enum

type Info = {
name: string,
age: number
}
type Person = Info & {
address: string
}
interface Info {
name: string,
age: number
}
type Address = {
address: string
}
type Person = Info & Address;
type Info = {
name: string,
age: number
}
type Address = {
address: string
}
type Person = Info & Address;
interface Info {
name: string,
age: number
}
interface Address {
address: string
}
interface Person = Info & Address;
interface Info {
name: string,
age: number
}
interface Address {
address: string
}
type Person = Info & Address;
type Person = {
name: string,
age: number
}
type Person = {
address: string
}
type Info {
name: string,
age: number
}
type Person extends Info {
address: string
}
enum BooleanLikeHeterogeneousEnum {
No = 0,
Yes = "YES",
}
enum Platform {   
Admob,
Applovin,
AdColony,
IronSource,
Inmobi,
Kidoz,
UnityAds,
Vungle
}
type AdsPlatform = keyof typeof Platform;

--

--

--

Consistency achieves everything https://github.com/paigekim29

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

15 Important JavaScript Array Methods You Should Know

test this medium post

Mastering Remix Forms

Image by Author

Frontend Weekly Digest #209 (3–9 May 2021)

Frontend Weekly Digest #170 (3–9 August 2020)

Frontend Weekly Digest #231 (11–17 October 2021)

How to Route in React Native (Stack Navigation and Moving Between Screens using Buttons)

Stable Matching Algorithm and How it’s Used

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Joo Hee Paige Kim

Joo Hee Paige Kim

Consistency achieves everything https://github.com/paigekim29

More from Medium

Explanation Utility Types in TypeScript

Documenting your typescript code for API reference website

How to mock files with TestDouble, TypeScript and Jest

Setting up fool-proof linter rules