You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportasyncfunctioncheckDuplicateEmailParent(email: string,): Promise<boolean>{try{// Query the Parent table to find a user with the given emailconstuser=awaite.select(e.User,(user)=>({email: true,filter_single: e.op(user.email,"=",email),})).run(client)// Check if the user with the given email existsreturn!!user// Return true if user exists, otherwise false}catch(error){console.error("Error checking for duplicate email:",error)throwerror}}
2.Run npx tsc
Relevant part of the schema
Schema:
type User extending Timestamped {
required email: str { constraint exclusive; };
required passwordHash: str;
title: str;
firstName: str;
lastName: str;
emailVerified: bool;
lastLogin: str;
multi link notes := .<createdBy[is Note];
surveyResponse := .<user[is SurveyResponse];
token := .<user[is Token];
userGroup := .<user[is UserGroupUsers];
courseProgress := .<user[is CourseProgress];
courseDeployment := .<user[is CourseDeployment];
organisation: Organisation;
`role`: `Role`{
on target delete allow;
};
permissions := (
with r := .role
select r.permissions
);
}
type Student extending User {
dateOfBirth: datetime;
# single link school: School;
seniorSchoolCohort: int32;
juniorSchoolCohort: int32;
parentPhone: str;
parentEmail: str;
parentFirstName: str;
schoolName: str;
schoolLocation: str;
schoolYear: str;
schoolForm: str;
phone: str;
}
type Teacher extending User {
formClass: str;
}
type Parent extending User {
phone: str;
school: School;
childEmail: str;
childRelationship: str;
}
The text was updated successfully, but these errors were encountered:
BKG01
changed the title
Using the like operator in js query builder caused typescript type checker FATAL Error
Using the ilike operator in js query builder caused typescript type checker FATAL Error
Jul 23, 2024
We have a canary build out which hopes to address this, do you mind trying that out and see if it works in your use case or if it has any issues elsewhere?
Steps to Reproduce:
2.Run
npx tsc
Relevant part of the schema
Schema:
Originally raised in Microsoft typescript GitHub microsoft/TypeScript#59308
Error created is:
The text was updated successfully, but these errors were encountered: