Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

94
Views
Why to use intersection with empty object type and mapped type in TypeScipt

In the source code of ts-toolbelt, there is often an intersection of an empty object and a mapped type. For what purpose is this done?

export type ReadonlyFlat<O> = {
  +readonly [K in keyof O]: O[K];
} & {}; // there

export type OptionalFlat<O> = {
  [K in keyof O]?: O[K];
} & {}; // there

type __Pick<O extends object, K extends keyof O> = {
  [P in K]: O[P];
} & {}; // there
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

.

over 4 years ago · Julieth Johana Panesso Sanchez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!