import { ErrorEmptyDocumentOrCollectionID, NoUndefinedAndBannedTypes, ErrorInvalidDocumentOrCollectionIDStart, ErrorInvalidDocumentOrCollectionID, ErrorEndOfID } from './error'; type InvalidIDCharacter = '/' | '..' | '//' | '__'; type AllowInvalidIDCharacter = Exclude; export type GetNumberOfPathSlash = GetNumberOfInvalidCharacter; export type GetNumberOfInvalidCharacter = ID extends `${string}${InvalidCharacter}${infer Tail}` ? GetNumberOfInvalidCharacter : SlashCount['length']; export type IsValidID = ID extends NoUndefinedAndBannedTypes ? ID extends '' ? ErrorEmptyDocumentOrCollectionID : ID extends `${string}/` ? ErrorEndOfID : ID extends `.${string}` ? ErrorInvalidDocumentOrCollectionIDStart : GetNumberOfInvalidCharacter> extends 0 ? ID extends `${string}__${string}` ? ErrorInvalidDocumentOrCollectionID : ID : ErrorInvalidDocumentOrCollectionID : NoUndefinedAndBannedTypes; export type IsValidDocIDLoop = D extends [infer R extends string, ...infer H extends string[]] ? IsValidDocIDLoop]> : ACC; export {};