Menu

Your salary floor can admit jobs that start below it
📰

Your salary floor can admit jobs that start below it

DEV Community: typescript·Nimbryxo-studio·18 days ago
#iEJDzMBi
#devtotypescript#devto#dev#const#compensation
Reading 0:00
15s threshold

Your salary floor can admit a job whose advertised minimum is lower.

You open your automated job alert and find another role that might pay enough. Now you're reading the range manually, which was the chore you meant to automate.

The trap sits in minSalary : it checks whether the published range reaches your threshold. It doesn't require the range to start there.

Example input: this narrows candidates before your application applies its stricter acceptance rule.

import { z } from " zod " ;

const Input = z . object ({ minSalary : z . number (). int (). min ( 0 ). max ( 1000000 ), includeNoSalary : z . boolean (), maxItems : z . number (). int (). min ( 1 ). max ( 500 ), });

const run_input = Input . parse ({ minSalary : 120000 , includeNoSalary : false , maxItems : 50 , });

const salaryFloor = run_input . minSalary ;

Enter fullscreen mode

Exit fullscreen mode

That input is valid. The assumption attached to it's the problem.

You need separate collection and acceptance rules.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.