diff --git a/src/APL/fileAPL.ts b/src/APL/fileAPL.ts index d9d162f..b850606 100644 --- a/src/APL/fileAPL.ts +++ b/src/APL/fileAPL.ts @@ -5,6 +5,12 @@ import { APL, AuthData } from "./apl"; const debug = debugPkg.debug("FileAPL"); +/** + * Load auth data from a file and return it as AuthData format. + * In case of incomplete or invalid data, return `undefined`. + * + * @param {string} fileName + */ export const loadDataFromFile = async (fileName: string): Promise => { debug(`Load auth data from the ${fileName} file`); let parsedData: Record = {}; @@ -22,6 +28,13 @@ export const loadDataFromFile = async (fileName: string): Promise { debug(`Save auth data to the ${fileName} file`); const newData = authData ? JSON.stringify(authData) : "{}";