diff --git a/src/io-ts.ts b/src/io-ts.ts index ba89d57..5c9945b 100644 --- a/src/io-ts.ts +++ b/src/io-ts.ts @@ -116,7 +116,7 @@ export function createRemoteDataFromJSON< a => a.foldL>( () => ({ type: 'Initial' }), - () => ({ type: 'Pending', progress: JSONProgress.encode((a as any).progress) }), + progress => ({ type: 'Pending', progress: JSONProgress.encode(progress) }), l => ({ type: 'Failure', error: leftType.encode(l) }), a => ({ type: 'Success', value: rightType.encode(a) }), ),