Skip to content

Releases: ivklgn/remote-data

2.1.2

01 Nov 11:57
Compare
Choose a tag to compare
  • fix export types for typescript@5
  • update deps

2.1.1

09 Jul 23:54
Compare
Choose a tag to compare
  • fix npm engines

2.1.0

02 Jul 09:03
Compare
Choose a tag to compare

https://www.npmjs.com/package/@young-aviator-club/remote-data/v/2.1.0

  1. better infer types in guards
if (RD.isSuccess(rd)) {
  rd; // infer RemoteDataSuccess
}
  1. call loading, when reloading not specified in fold
rd = RD.reloading();

RD.fold(rd, {
  notAsked: () => 'no data',
  loading: () => 'loading..', // call loading (!)
  success: (n: number) => String(10 + n),
})