UNPKG

@barchart/common-js

Version:
56 lines (55 loc) 1.41 kB
/** * Fluent interface for building a {@link Credentials} object. * * @public */ export default class CredentialsBuilder { /** * The {@link Credentials} object, given all the information provided thus far. * * @public * @returns {Credentials} */ public get credentials(): Credentials; /** * Sets a literal username. * * @public * @param {string} username * @returns {CredentialsBuilder} */ public withLiteralUsername(username: string): CredentialsBuilder; /** * Sets a function which returns a username. * * @public * @param {Function} delegate * @returns {CredentialsBuilder} */ public withDelegateUsername(delegate: Function): CredentialsBuilder; /** * Sets a literal password. * * @public * @param {string} password * @returns {CredentialsBuilder} */ public withLiteralPassword(password: string): CredentialsBuilder; /** * Sets a function which returns a password. * * @public * @param {Function} delegate * @returns {CredentialsBuilder} */ public withDelegatePassword(delegate: Function): CredentialsBuilder; /** * Returns a string representation. * * @public * @returns {string} */ public toString(): string; #private; } import Credentials from './../definitions/Credentials.js';