Skip to content

Commit

Permalink
LOGS: build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mvshmakov committed Jun 7, 2020
1 parent c61a9f6 commit 563da36
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/modules/News.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { existsSync, readFileSync, writeFileSync } from "fs";
import makeError from "make-error";
import { TArticle } from "google-news-rss";
import { existsSync, readFileSync, writeFileSync } from "fs";

import BaseError from "@/modules/BaseError";
// import resolveNewsArticles from "@/resolvers/news";
import { resolveNewsFileConfigSync } from "@/resolvers/config";

const NewsStorageError = BaseError.createError("NewsStorageError");
const NewsStorageError = makeError("NewsStorageError");

type TNewsObject = {
articles: TArticle[];
Expand All @@ -15,7 +15,7 @@ type TNewsObject = {
class NewsStorage {
private _instance: TNewsObject;

get instanсe(): TNewsObject {
get instance(): TNewsObject {
return this._instance;
}

Expand All @@ -35,7 +35,7 @@ class NewsStorage {
// this._instance = await resolveNewsArticles();
this.dumpNews(this._instance, newsPath);
} catch (exception) {
throw NewsStorageError("Cannot build NewsStorage");
throw new NewsStorageError("Cannot build NewsStorage");
}
}

Expand All @@ -44,7 +44,7 @@ class NewsStorage {
const jsonString = JSON.stringify(builtNews);
writeFileSync(parsedNewsPath, jsonString, "utf8");
} catch (exception) {
throw NewsStorageError("Cannot dump NewsStorage");
throw new NewsStorageError("Cannot dump NewsStorage");
}
}
}
Expand Down

0 comments on commit 563da36

Please sign in to comment.