This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Exposes a URL that specifies the behaviour of this scalar.""" | |
| directive @specifiedBy( | |
| """The URL that specifies the behaviour of this scalar.""" | |
| url: String! | |
| ) on SCALAR | |
| """Indicates an Input Object is a OneOf Input Object.""" | |
| directive @oneOf on INPUT_OBJECT | |
| type AccessTokenResponse { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useForm, SubmitHandler, SubmitErrorHandler, ValidationMode } from 'react-hook-form'; | |
| import { z } from 'zod'; | |
| import { zodResolver } from "@hookform/resolvers/zod"; | |
| import { BaseSyntheticEvent, useState } from "react"; | |
| interface UseValidationProps<T extends z.ZodType<any, any>> { | |
| schema: T; | |
| onSubmit: SubmitHandler<z.infer<T>>; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type NonArrayFunctionKeys<T> = { | |
| [K in keyof T]-?: T[K] extends Function | unknown[] ? never : K | |
| }[keyof T]; | |
| const handleInputChange = <TKey extends NonArrayFunctionKeys<User>, TValue>( | |
| value: TValue, | |
| name: TKey, | |
| // setStateCallback: React.Dispatch<React.SetStateAction<User>> | |
| ) => setProfile((prev) => ({...prev, [name]: value})); | |
| type KeysMatching<T, V> = { [K in keyof T]-?: T[K] extends V ? K : never }[keyof T]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@nestjs/common'; | |
| import { InjectModel } from '@nestjs/mongoose'; | |
| import { | |
| Document, | |
| FilterQuery, | |
| HydratedDocument, | |
| LeanDocument, | |
| Model, | |
| model, | |
| ProjectionType, |