Skip to content

Commit

Permalink
fix: incorrect type for JSONPending (closes #31)
Browse files Browse the repository at this point in the history
  • Loading branch information
raveclassic committed May 14, 2019
1 parent 867efb3 commit 08bbcc7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/remote-data-io.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as t from 'io-ts';
import { createOptionFromNullable } from 'io-ts-types';

import {
failure,
Expand All @@ -11,9 +10,9 @@ import {
RemotePending,
RemoteSuccess,
success,
RemoteProgress,
progress,
} from './remote-data';
import { createOptionFromNullable } from 'io-ts-types/lib/fp-ts/createOptionFromNullable';

export interface JSONFailure<L> {
type: 'Failure';
Expand All @@ -24,9 +23,14 @@ export interface JSONInitial {
type: 'Initial';
}

export interface JSONProgress {
loaded: number;
total: number | null;
}

export interface JSONPending {
type: 'Pending';
progress: RemoteProgress | null;
progress: JSONProgress | null;
}

export interface JSONSuccess<A> {
Expand Down

0 comments on commit 08bbcc7

Please sign in to comment.