- Preparing search index...
- The search index is not available
@onehop/js
- validateId<T>(maybeId: string, prefix?: T | T[]): maybeId is `${T}_${string}`
-
Type Parameters
-
T extends "user" | "project" | "pm" | "role" | "pi" | "ptk" | "pat" | "container" | "pipe_room" | "deployment" | "bearer" | "ptkid" | "secret" | "gateway" | "domain" | "leap_token" | "build" | "rollout" | "health_check" | "session" = "user" | "project" | "pm" | "role" | "pi" | "ptk" | "pat" | "container" | "pipe_room" | "deployment" | "bearer" | "ptkid" | "secret" | "gateway" | "domain" | "leap_token" | "build" | "rollout" | "health_check" | "session"
Parameters
-
maybeId: string
-
Optional
prefix: T | T[]
Returns maybeId is `${T}_${string}`
Validates that a string is a valid ID
Returns
true if the string is an id