How does a simple Union differ from a discriminated union?
Frontend
The form that the user hasn't even started editing has already produced a validation error. Is this the correct behavior or not?
What is currently the 'ceiling' for you in your current job, which made you decide to look for a new place?
Do you know what happens if you write return and leave it empty (without a value)?
type Row = { id: number; name: string; } const tableData: Row[] = [ {id: 1, name: "A"}, {id: 2, name: "B"} ] type Validator = (value: unknown) => string | undefined; console.log("...");
type Row = { id: number; name: string; } const tableData: Row[] = [ {id: 1, name: "A"}, {id: 2, name: "B"}, ] type Validator = (value: unknown) => string | undefined; console.log("...");
Can you explain what happens in the system when a user clicks to edit the first row of the table?
If the user edits string A, and its current value of polyname matches the original value, the validator should not produce an error. Why does your implementation of the validator produce an error in this case, given that the initial value of the field matches itself?
What did you do before transitioning into development?
Why did you decide to switch to a new stack/change activity? What was the reason if you worked in a company for 10 years?
Did you have any experience before development, what did you do?
When the form opens for editing the first row, the polyname field is filled with the value from that row (for example, 'A'). The validator you wrote is triggered. Do you think it is normal behavior for the validator to find a match and produce an error even though the user has not yet started editing?
Tell us what your development team is currently working on and what you are doing.
Regarding the last 4-5 years of work, which task do you remember most and why?
How to modify the validator to perform case-insensitive uniqueness check, considering that the component props have access to the entire data table and the row id being edited?
What will the validator you wrote output if the user clicked to edit the first row and the value of name/polyname is equal to the original value of that row?
A requirement has appeared: the polyname field should not match other names (polyname) in the table. How to implement such a uniqueness check?
What attracted you to your company? What would you like to find at your new job?
At the moment of the first form render, when the field is already filled with an initial string value (e.g., 'A'), and the validator is called with a value equal to 'A', which corresponds to a specific string in your code — should there be an error in this case or not?
Write a validator using the given function signature (line 11 in the editor). Note that value has type unknown, as the form does not know the exact type of the field, but it is assumed to be a string. Please use arrow functions instead of the function keyword.