INNER CODE UNIT · TypeScript

isUndefined

maplibre/maplibre-react-native · package/src/utils/index.ts:29

export function isUndefined(obj: unknown): obj is undefined {
  return typeof obj === "undefined";
}

export function isString(str: unknown): str is string {
  return typeof str === "string";
}

export function isBoolean(bool: unknown): bool is boolean {
  return typeof bool === "boolean";
}

export type NativeArg =
  | string
  | number
  | boolean
  | null
  | { [k: string]: NativeArg }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…