• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alovajs / alova / #210

08 Oct 2024 07:26AM UTC coverage: 93.734% (-0.09%) from 93.826%
#210

push

github

web-flow
Merge pull request #554 from alovajs/changeset-release/main

ci: release

1608 of 1761 branches covered (91.31%)

Branch coverage included in aggregate %.

9537 of 10129 relevant lines covered (94.16%)

60.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/packages/alova/src/utils/helper.ts
1
import { boundStatesHook } from '@/alova';
1✔
2
import { FrontRequestState } from '~/typings';
1✔
3
import myAssert from './myAssert';
1✔
4

1✔
5
/**
1✔
6
 * 导出fetchStates map
1✔
7
 * @param frontStates front states map
1✔
8
 * @returns fetchStates map
1✔
9
 */
1✔
10
export const exportFetchStates = <L = any, R = any, E = any, D = any, U = any>(
1✔
11
  frontStates: FrontRequestState<L, R, E, D, U>
×
12
) => ({
×
13
  fetching: frontStates.loading,
×
14
  error: frontStates.error,
×
15
  downloading: frontStates.downloading,
×
16
  uploading: frontStates.uploading
×
17
});
1✔
18
export const promiseStatesHook = () => {
1✔
19
  myAssert(!!boundStatesHook, `\`statesHook\` is not set in alova instance`);
×
20
  return boundStatesHook as NonNullable<typeof boundStatesHook>;
×
21
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc