mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 06:17:04 +02:00
rm any
This commit is contained in:
@@ -3,7 +3,7 @@ import { format } from "date-fns";
|
||||
export function formatTime(fmt: string): string {
|
||||
try {
|
||||
return format(new Date(), fmt);
|
||||
} catch (err: any) {
|
||||
} catch (e: unknown) {
|
||||
return "format error";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* Checks whether the value passed in can be considered a string.
|
||||
* @param value The value to check if it is a string.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export function isString(value: any): boolean {
|
||||
export function isString(value: unknown): value is string {
|
||||
return typeof value === "string" || value instanceof String;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user