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 { RefObject, useEffect } from 'react'; | |
| export default function useDetectEventOutside< | |
| TNode extends Node, | |
| TEventType extends keyof DocumentEventMap | |
| >( | |
| reference: RefObject<TNode>, | |
| eventType: TEventType, | |
| eventListener: (this: Document, ev: DocumentEventMap[TEventType]) => any | |
| ) { |
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
| export type Primitives = | |
| | number | |
| | string | |
| | boolean | |
| | bigint | |
| | symbol | |
| | undefined | |
| | null; | |
| export type DeepReadonly<TInput> = TInput extends Primitives | Function |
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 formidable from 'formidable'; | |
| import { IncomingMessage } from 'http'; | |
| import { z, ZodObject, ZodType } from 'zod'; | |
| export type KnownFormFields = Record<string, ZodType>; | |
| export type FormParseResult<TFields, TFiles> = { | |
| error?: Error; | |
| fields?: TFields; | |
| files?: TFiles; |
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 EnumKey<EnumType> = keyof EnumType; | |
| type IdentityEnum<T> = T extends Array<infer E extends string> ? { | |
| readonly [P in T[keyof T] as E]: E | |
| } : never; | |
| type IdentityEnumConstructor = { | |
| <T extends string[]>(...values: T): IdentityEnum<T>; | |
| new <T extends string[]>(...values: T): IdentityEnum<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 {Query, QueryCache, QueryClient, QueryFilters} from "@tanstack/react-query"; | |
| import {InfiniteData} from "@tanstack/query-core/build/lib/types"; | |
| export type InfiniteQueryData<U, V> = InfiniteData<U | V | undefined>; | |
| export type InfinitePageMapperParam<OldPageT, NewPageT> = { | |
| page: OldPageT | NewPageT, | |
| index: number, | |
| param?: unknown, | |
| query?: Query<unknown, unknown, InfiniteQueryData<OldPageT, NewPageT>>, |
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
| package io.github.sauranbone.plang.core.abstraction; | |
| import javax.annotation.Nonnull; | |
| import javax.annotation.Nullable; | |
| import java.util.Collection; | |
| import java.util.Map; | |
| import java.util.Set; | |
| import java.util.function.Function; | |
| /** |
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
| package io.github.sauranbone.plang; | |
| import org.apache.commons.lang3.StringUtils; | |
| import java.util.regex.Pattern; | |
| /** | |
| * @author Vinzent Zeband | |
| * @version 06:07 CET, 13.02.2022 | |
| * @since 1.0 |
NewerOlder