Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(retry-plugin): fix typo and clarify default retryDelay #3362

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apps/website-new/docs/en/plugin/plugins/retry-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ type ScriptWithRetryOptions = {

### Properties

- **script**: `ScriptWithRetryOptions` (optional)
- used to configure the retry options for fetch type resources.
- **fetch**: `FetchWithRetryOptions` (optional)
- `FetchWithRetryOptions` is the type used to configure the retry options for fetch type resources.

- **script**: `ScriptWithRetryOptions` (optional)
- `ScriptWithRetryOptions` is the type used to configure the retry options for script type resources.
Expand All @@ -140,14 +140,14 @@ type ScriptWithRetryOptions = {
- **retryDelay**:
- `number`
- optional
- The delay time between each retry (in milliseconds).
- The delay time between each retry (in milliseconds), default is 1000 (1 second).

- **fallback**:
- `() => string | ((url: string | URL | globalThis.Request) => string)`
- optional
- A function, which can optionally receive the failed URL, that returns a fallback string to be used if all retries fail. This function is called when all retry attempts have failed.

### ScriptWithRetryOptions 类型说明
### ScriptWithRetryOptions Description

- **retryTimes**:
- `number`
Expand All @@ -157,7 +157,7 @@ type ScriptWithRetryOptions = {
- **retryDelay**:
- `number`
- optional
- The delay time between each retry (in milliseconds).
- The delay time between each retry (in milliseconds), default is 1000 (1 second).

- **moduleName**:
- `Array<string>`
Expand Down Expand Up @@ -191,7 +191,7 @@ init({
retryTimes: 3,
// the retry delay
retryDelay: 1000,
// the module name list that need to be retried, defualt behavior is to retry all modules
// the module name list that need to be retried, default behavior is to retry all modules
moduleName: ['remote1'],
// the callback function that will be called after all retried failed
cb: (resolve, error) => {
Expand Down
Loading