Deviopath › TypeScript

Count by Type

Easy · Utility Types

Write countByType(values: unknown[]): Record<string, number> that counts how many values there are of each typeof type.

Next: Optional Chaining on Nested Data