Skip to content

Commit d3e2b7f

Browse files
authored
[engsys] fix core-util linter errors (Azure#21391)
1 parent b3571fb commit d3e2b7f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sdk/core/core-util/src/error.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { isObject } from "./object";
55

66
/**
77
* Typeguard for an error object shape (has name and message)
8-
* @param e Something caught by a catch clause.
8+
* @param e - Something caught by a catch clause.
99
*/
1010
export function isError(e: unknown): e is Error {
1111
if (isObject(e)) {
@@ -19,7 +19,7 @@ export function isError(e: unknown): e is Error {
1919
/**
2020
* Given what is thought to be an error object, return the message if possible.
2121
* If the message is missing, returns a stringified version of the input.
22-
* @param e Something thrown from a try{} block
22+
* @param e - Something thrown from a try block
2323
* @returns The error message or a string of the input
2424
*/
2525
export function getErrorMessage(e: unknown): string {
@@ -33,7 +33,7 @@ export function getErrorMessage(e: unknown): string {
3333
} else {
3434
stringified = String(e);
3535
}
36-
} catch (e) {
36+
} catch (err) {
3737
stringified = "[unable to stringify input]";
3838
}
3939
return `Unknown error ${stringified}`;

sdk/core/core-util/src/random.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT license.
3+
14
/**
25
* Returns a random integer value between a lower and upper bound,
36
* inclusive of both bounds.

0 commit comments

Comments
 (0)