Skip to content

[Question] Is there a reason why Job.id is marked as optional in type definitions? #2547

Answered by manast
BOTKooper asked this question in Q&A
Discussion options

You must be logged in to vote

I think in that case what we can do is add a type guard to the process function where we know the id is present:
Job & { id: string }

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BOTKooper
Comment options

@manast
Comment options

Answer selected by BOTKooper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants