Commit 5af805a9 authored by Andrei-Laurențiu Olteanu's avatar Andrei-Laurențiu Olteanu Committed by Commit Bot

[Telemetry SWX] Change annotations for dpsl

Add not null annotation to all types.

Change indentation to accommodate change.

Bug: b:162051831
Change-Id: I6c4ddc44733b46e5d09526eb073a41d3acab28b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2350422Reviewed-by: default avatarOleh Lamzin <lamzin@google.com>
Reviewed-by: default avatarMahmoud Gawad <mgawad@google.com>
Commit-Queue: Laurențiu Olteanu <lolteanu@google.com>
Cr-Commit-Position: refs/heads/master@{#813163}
parent fbc653a8
......@@ -15,7 +15,7 @@ const dpsl_internal = {};
/**
* Enum for message types.
* @enum { string }
* @enum { !string }
*/
dpsl_internal.Message = {
DIAGNOSTICS_AVAILABLE_ROUTINES: 'DiagnosticsService.GetAvailableRoutines',
......
......@@ -211,7 +211,7 @@ class DiagnosticsProxy {
/**
* Requests available routines.
* @return { !Promise<dpsl_internal.DiagnosticsGetAvailableRoutinesResponse> }
* @return {!Promise<!dpsl_internal.DiagnosticsGetAvailableRoutinesResponse>}
*/
async handleGetAvailableRoutines() {
const availableRoutines =
......@@ -305,11 +305,11 @@ class DiagnosticsProxy {
/**
* Runs a command on a routine.
* @param { !Object } message
* @return { !Promise<dpsl_internal.DiagnosticsGetRoutineUpdateResponse> }
* @return { !Promise<!dpsl_internal.DiagnosticsGetRoutineUpdateResponse> }
*/
async handleGetRoutineUpdate(message) {
const request =
/** @type {dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ (
/** @type {!dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ (
message);
let routine, command;
......@@ -347,7 +347,7 @@ class DiagnosticsProxy {
try {
const response = await handler(message);
return this.convertRunRoutineResponse(response.response);
} catch (/** @type !Error */ error) {
} catch (/** @type {!Error} */ error) {
return error;
}
};
......@@ -841,7 +841,7 @@ class TelemetryProxy {
/**
* Requests telemetry info.
* @param { Object } message
* @param { !Object } message
* @return { !Promise<!dpsl_internal.ProbeTelemetryInfoResponse> }
*/
async handleProbeTelemetryInfo(message) {
......
......@@ -45,9 +45,9 @@ chromeos.test_support = {};
*/
async getAvailableRoutines() {
const response =
/** @type {dpsl_internal.DiagnosticsGetAvailableRoutinesResponse} */ (
await messagePipe.sendMessage(
dpsl_internal.Message.DIAGNOSTICS_AVAILABLE_ROUTINES));
/** @type {!dpsl_internal.DiagnosticsGetAvailableRoutinesResponse} */
(await messagePipe.sendMessage(
dpsl_internal.Message.DIAGNOSTICS_AVAILABLE_ROUTINES));
return response;
}
......@@ -61,7 +61,7 @@ chromeos.test_support = {};
*/
async sendCommandToRoutine(routineId, command, includeOutput) {
const message =
/** @type {dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ ({
/** @type {!dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ ({
routineId: routineId,
command: command,
includeOutput: includeOutput,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment