Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 4a8eec8d authored by Danny Lin's avatar Danny Lin
Browse files

Fix JSDoc return types

These are supposed to be return types, not names.
parent cb2700ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ export class BlobStore {
     * Downloads the file from the given URL and saves it to this BlobStore.
     *
     * @param {string} url - URL of the file to download.
     * @returns {blob} Blob containing the downloaded data.
     * @returns {Promise<Blob>} Blob containing the downloaded data.
     */
    async download(url) {
        let filename = url.split("/").pop();
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ export function setDebugLevel(level: DebugLevel) {
 * Reads all of the data in the given blob and returns it as an ArrayBuffer.
 *
 * @param {Blob} blob - Blob with the data to read.
 * @returns {buffer} ArrayBuffer containing data from the blob.
 * @returns {Promise<ArrayBuffer>} ArrayBuffer containing data from the blob.
 * @ignore
 */
export function readBlobAsBuffer(blob: Blob): Promise<ArrayBuffer> {
+5 −5
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ export class FastbootDevice {
     * Read a raw command response from the bootloader.
     *
     * @private
     * @returns {response} Object containing response text and data size, if any.
     * @returns {Promise<CommandResponse>} Object containing response text and data size, if any.
     * @throws {FastbootError}
     */
    private async readResponse() {
@@ -311,11 +311,11 @@ export class FastbootDevice {
    }

    /**
     * Send a textual command to the bootloader.
     * Send a textual command to the bootloader and read the response.
     * This is in raw fastboot format, not AOSP fastboot syntax.
     *
     * @param {string} command - The command to send.
     * @returns {response} Object containing response text and data size, if any.
     * @returns {Promise<CommandResponse>} Object containing response text and data size, if any.
     * @throws {FastbootError}
     */
    async runCommand(command: string) {
@@ -337,7 +337,7 @@ export class FastbootDevice {
     * does not exist.
     *
     * @param {string} varName - The name of the variable to get.
     * @returns {value} Textual content of the variable.
     * @returns {Promise<string>} Textual content of the variable.
     * @throws {FastbootError}
     */
    async getVariable(varName: string) {
@@ -369,7 +369,7 @@ export class FastbootDevice {
     * Get the maximum download size for a single payload, in bytes.
     *
     * @private
     * @returns {downloadSize}
     * @returns {Promise<number>}
     * @throws {FastbootError}
     */
    private async getDownloadSize() {
+2 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ export interface SparseChunk {
 * Returns a parsed version of the sparse image file header from the given buffer.
 *
 * @param {ArrayBuffer} buffer - Raw file header data.
 * @returns {header} Object containing the header information.
 * @returns {SparseHeader} Object containing the header information.
 */
export function parseFileHeader(buffer: ArrayBuffer) {
    let view = new DataView(buffer);
@@ -169,7 +169,7 @@ function createImage(header: SparseHeader, chunks: Array<SparseChunk>) {
 * Creates a sparse image from buffer containing raw image data.
 *
 * @param {ArrayBuffer} rawBuffer - Buffer containing the raw image data.
 * @returns {sparseBuffer} Buffer containing the new sparse image.
 * @returns {ArrayBuffer} Buffer containing the new sparse image.
 */
export function fromRaw(rawBuffer: ArrayBuffer) {
    let header = {