Fix Lint errors in StringUtility.ts (#479)

This commit is contained in:
Sunil Kumar Yadav 2021-03-10 07:03:29 +05:30 committed by GitHub
parent d0f6923d24
commit b85a20cbea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 13 deletions

View File

@ -248,8 +248,6 @@ src/Shared/ExplorerSettings.ts
src/Shared/PriceEstimateCalculator.ts
src/Shared/StorageUtility.test.ts
src/Shared/StorageUtility.ts
src/Shared/StringUtility.test.ts
src/Shared/StringUtility.ts
src/Shared/appInsights.ts
src/SparkClusterManager/ArcadiaResourceManager.ts
src/SparkClusterManager/SparkClusterManager.ts

View File

@ -5,7 +5,7 @@ import { ConsoleDataType } from "../Menus/NotificationConsole/NotificationConsol
import { ContextualPaneBase } from "./ContextualPaneBase";
import { LocalStorageUtility, StorageKey } from "../../Shared/StorageUtility";
import * as NotificationConsoleUtils from "../../Utils/NotificationConsoleUtils";
import { StringUtility } from "../../Shared/StringUtility";
import * as StringUtility from "../../Shared/StringUtility";
import { configContext } from "../../ConfigContext";
export class SettingsPane extends ContextualPaneBase {

View File

@ -1,4 +1,4 @@
import { StringUtility } from "./StringUtility";
import * as StringUtility from "./StringUtility";
export class LocalStorageUtility {
public static hasItem(key: StorageKey): boolean {

View File

@ -1,4 +1,4 @@
import { StringUtility } from "./StringUtility";
import * as StringUtility from "./StringUtility";
describe("String utility", () => {
it("Convert to integer from string", () => {

View File

@ -1,9 +1,7 @@
export class StringUtility {
public static toNumber(num: string | null): number {
export function toNumber(num: string | null): number {
return Number(num);
}
public static toBoolean(valueStr: string | null): boolean {
export function toBoolean(valueStr: string | null): boolean {
return valueStr === "true";
}
}