Commit 58a8a77a by Vladislav Lagunov

Игнорирование ошибки в utils/persistent.ts

parent 635a1aae
...@@ -63,7 +63,8 @@ export class Cache<A> { ...@@ -63,7 +63,8 @@ export class Cache<A> {
if (stringContent === null) return failure({ tag: 'NoItem' } as Err); if (stringContent === null) return failure({ tag: 'NoItem' } as Err);
try { try {
const json = JSON.parse(stringContent); const json = JSON.parse(stringContent);
return cacheItemDecoder(this.decoder).validate(json) // @ts-ignore
return cacheItemDecoder<A>(this.decoder).validate(json)
.mapLeft(problem => ({ tag: 'InvalidPayload', problem } as Err)) .mapLeft(problem => ({ tag: 'InvalidPayload', problem } as Err))
.chain(({payload, version}) => { .chain(({payload, version}) => {
if (this.options.version && version !== version) { if (this.options.version && version !== version) {
......
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