import { createBooleanQueryDescriptor , QueryParser } from "../../query_parser" ; import { Uri } from "../../uri" ; import { isNullOrUndefined } from "../../utility" ; /**
 * Redis options common to several connection types.
 */ export interface RedisQueryOptions { noDelay ? : boolean ; password ? : string ; } param uri returns throws export const parseRedisQuery = ( uri ) : RedisQueryOptions => { if ( isNullOrUndefined ( uri . query ) ) { return { } ; } const parser = new QueryParser < RedisQueryOptions > ( [ { source : "password" } , createBooleanQueryDescriptor ( "noDelay" ) , ] ) ; return parser . parse ( uri . query , { } ) ; } ;