# Function inferMaybeWithToken

- inferMaybeWithToken<T extends ZodType<any, ZodTypeDef, any>>(
  type: T,
  ): ZodIntersection<
  T,
  ZodObject<
  { token: ZodOptional<ZodUnion<[ZodString, ZodUndefined]>> },
  "strip",
  ZodTypeAny,
  { token?: string },
  { token?: string },
  >,
  >

  #### Type Parameters

  - T extends ZodType<any, ZodTypeDef, any>

  #### Parameters

  - type: T

  #### Returns ZodIntersection<
  T,
  ZodObject<
  { token: ZodOptional<ZodUnion<[ZodString, ZodUndefined]>> },
  "strip",
  ZodTypeAny,
  { token?: string },
  { token?: string },
  >,
  >

  - Defined in jamespot-user-api/src/types/utils.ts:209