Commit 3e301872 authored by Panagiotis Skarvelis's avatar Panagiotis Skarvelis
Browse files

make path optional

parent c01663f3
......@@ -9,7 +9,7 @@ import { AuditRecord, AuditEngine, SEQTYPES } from '../../interfaces/index.js';
*/
export declare class FileEngine implements AuditEngine {
#private;
constructor(path: string, pnseqtype?: SEQTYPES);
constructor(path?: string, pnseqtype?: SEQTYPES);
/**
* @description Store a record in the database
* @param {AuditRecord} record - record to be stored
......
......@@ -32,7 +32,7 @@ class FileEngine {
constructor(path, pnseqtype) {
_FileEngine_path.set(this, void 0);
_FileEngine_pnseqtype.set(this, void 0);
__classPrivateFieldSet(this, _FileEngine_path, path, "f");
__classPrivateFieldSet(this, _FileEngine_path, path ? path : "/tmp", "f");
__classPrivateFieldSet(this, _FileEngine_pnseqtype, pnseqtype || "innumerable", "f");
}
/**
......
......@@ -9,7 +9,7 @@ import { AuditRecord, AuditEngine, SEQTYPES } from '../../interfaces/index.js';
*/
export declare class FileEngine implements AuditEngine {
#private;
constructor(path: string, pnseqtype?: SEQTYPES);
constructor(path?: string, pnseqtype?: SEQTYPES);
/**
* @description Store a record in the database
* @param {AuditRecord} record - record to be stored
......
......@@ -14,7 +14,7 @@ export class FileEngine {
#path;
#pnseqtype;
constructor(path, pnseqtype) {
this.#path = path;
this.#path = path ? path : "/tmp";
this.#pnseqtype = pnseqtype || "innumerable";
}
/**
......
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