First time trying typescript.
I have an object that looks like
interface Job {
//... some data
priority: number
}
and I want to return the highest priority from a Set of Jobs (note: not the Job itself, but the actual value). So naturally I just tried:
// let jobs: Set<Job> = fetchJobs();
jobs.map((job) => job.priority).max()
// or
jobs.values().map((job) => job.priority).max()
But it tells meUncaught TypeError: jobs.map is not a function