Skip to content

Commit 19e6337

Browse files
committed
docs: add missing return types
1 parent 717d766 commit 19e6337

File tree

7 files changed

+29
-31
lines changed

7 files changed

+29
-31
lines changed

Diff for: docs/api/README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const store = new Vuex.Store({ ...options })
109109
110110
### strict
111111
112-
- type: `Boolean`
112+
- type: `boolean`
113113
- default: `false`
114114
115115
Force the Vuex store into strict mode. In strict mode any mutations to Vuex state outside of mutation handlers will throw an Error.
@@ -118,7 +118,7 @@ const store = new Vuex.Store({ ...options })
118118
119119
### devtools
120120
121-
- type: `Boolean`
121+
- type: `boolean`
122122
123123
Turn the devtools on or off for a particular vuex instance. For instance passing false tells the Vuex store to not subscribe to devtools plugin. Useful for if you have multiple stores on a single page.
124124
@@ -128,7 +128,6 @@ const store = new Vuex.Store({ ...options })
128128
}
129129
```
130130
131-
132131
## Vuex.Store Instance Properties
133132
134133
### state
@@ -154,8 +153,8 @@ const store = new Vuex.Store({ ...options })
154153
155154
### dispatch
156155
157-
- `dispatch(type: string, payload?: any, options?: Object)`
158-
- `dispatch(action: Object, options?: Object)`
156+
- `dispatch(type: string, payload?: any, options?: Object): Promise<any>`
157+
- `dispatch(action: Object, options?: Object): Promise<any>`
159158
160159
Dispatch an action. `options` can have `root: true` that allows to dispatch root actions in [namespaced modules](../guide/modules.md#namespacing). Returns a Promise that resolves all triggered action handlers. [Details](../guide/actions.md)
161160
@@ -240,7 +239,7 @@ const store = new Vuex.Store({ ...options })
240239
241240
### hasModule
242241
243-
- `hasModule(path: string | Array<string>)`
242+
- `hasModule(path: string | Array<string>): boolean`
244243
245244
Check if the module with the given name is already registered. [Details](../guide/modules.md#dynamic-module-registration)
246245

Diff for: docs/fr/api/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const store = new Vuex.Store({ ...options })
107107
108108
### strict
109109
110-
- type : `Boolean`
110+
- type : `boolean`
111111
- default: `false`
112112
113113
Force le store Vuex en mode strict. En mode strict, toute mutation de l'état en dehors des gestionnaires de mutation lancera une erreur.
@@ -139,8 +139,8 @@ const store = new Vuex.Store({ ...options })
139139

140140
### dispatch
141141

142-
- `dispatch(type: string, payload?: any, options?: Object)`
143-
- `dispatch(action: Object, options?: Object)`
142+
- `dispatch(type: string, payload?: any, options?: Object): Promise<any>`
143+
- `dispatch(action: Object, options?: Object): Promise<any>`
144144

145145
Propager une action. Retourne la valeur renvoyée par le gestionnaire d'action déclenché, ou une Promesse si plusieurs gestionnaires ont été déclenchés. [Plus de détails](../guide/actions.md)
146146

Diff for: docs/ja/api/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ const store = new Vuex.Store({ ...options })
154154

155155
### dispatch
156156

157-
- **`dispatch(type: string, payload?: any, options?: Object)`**
158-
- **`dispatch(action: Object, options?: Object)`**
157+
- **`dispatch(type: string, payload?: any, options?: Object): Promise<any>`**
158+
- **`dispatch(action: Object, options?: Object): Promise<any>`**
159159

160160
アクションをディスパッチします。`options` は[名前空間付きモジュール](../guide/modules.md#名前空間)で root なアクションにディスパッチできる `root: true` を持つことできます。 すべてのトリガーされたアクションハンドラを解決するPromiseを返します。[詳細](../guide/actions.md)
161161

@@ -240,7 +240,7 @@ const store = new Vuex.Store({ ...options })
240240

241241
### hasModule
242242

243-
- `hasModule(path: string | Array<string>)`
243+
- `hasModule(path: string | Array<string>): boolean`
244244

245245
動的なモジュールがすでに登録されているかどうかを確認します。[詳細](../guide/modules.md#dynamic-module-registration)
246246

Diff for: docs/kr/api/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const store = new Vuex.Store({ ...options })
109109

110110
### strict
111111

112-
- 자료형: `Boolean`
112+
- 자료형: `boolean`
113113
- 기본값: `false`
114114

115115
Vuex 저장소를 strict 모드로 변경합니다. strict 모드에서 변이 핸들러 외부의 Vuex 상태에 대한 임의의 변이는 오류를 발생시킵니다.
@@ -141,8 +141,8 @@ const store = new Vuex.Store({ ...options })
141141

142142
### dispatch
143143

144-
- `dispatch(type: string, payload?: any, options?: Object)`
145-
- `dispatch(action: Object, options?: Object)`
144+
- `dispatch(type: string, payload?: any, options?: Object): Promise<any>`
145+
- `dispatch(action: Object, options?: Object): Promise<any>`
146146

147147
액션을 디스패치 합니다. `options``root:true` 를 포함하면 [네임스페이스 모듈](../guide/modules.md#네임스페이스) 의 root 액션에 디스패치를 허용합니다. 모든 트리거된 액션 핸들러를 처리하는 Promise를 반환합니다. [상세](../guide/actions.md)
148148

Diff for: docs/ptbr/api/README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const store = new Vuex.Store({ ...options })
109109
110110
### strict
111111
112-
- type: `Boolean`
112+
- type: `boolean`
113113
- default: `false`
114114
115115
Força o _store_ Vuex em modo estrito. No modo estrito, qualquer mutação ao estado do Vuex fora dos manipuladores de mutação acusará um erro.
@@ -118,7 +118,7 @@ const store = new Vuex.Store({ ...options })
118118
119119
### devtools
120120
121-
- type: `Boolean`
121+
- type: `boolean`
122122
123123
Ative ou desative as ferramentas de desenvolvedor para uma determinada instância vuex. Passar _false_ à instância diz ao _store_ Vuex para não se integrar ao _devtools_. Útil para quando se tem vários _stores_ em uma _single page_.
124124
@@ -128,7 +128,6 @@ const store = new Vuex.Store({ ...options })
128128
}
129129
```
130130
131-
132131
## Vuex.Store Propriedades da Instância
133132
134133
### state
@@ -154,8 +153,8 @@ const store = new Vuex.Store({ ...options })
154153
155154
### dispatch
156155
157-
- `dispatch(type: string, payload?: any, options?: Object)`
158-
- `dispatch(action: Object, options?: Object)`
156+
- `dispatch(type: string, payload?: any, options?: Object): Promise<any>`
157+
- `dispatch(action: Object, options?: Object): Promise<any>`
159158
160159
Despacha uma ação. _options_ pode ter _root: true_ que permite despachar ações para raiz em [módulos namespaced](../guide/modules.md#namespacing). Retorna um _Promise_ que resolve todos os manipuladores de ação acionados. [Detalhes](../guide/actions.md)
161160

Diff for: docs/ru/api/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const store = new Vuex.Store({ ...options });
109109
110110
### strict
111111
112-
* тип: `Boolean`
112+
* тип: `boolean`
113113
* по умолчанию: `false`
114114
115115
Форсирует использование «строгого режима» в хранилище Vuex. В нём любые изменения состояния, происходящие вне обработчиков мутаций, будут выбрасывать ошибки.
@@ -118,10 +118,10 @@ const store = new Vuex.Store({ ...options });
118118
119119
### devtools
120120
121-
* тип: `Boolean`
121+
* тип: `boolean`
122122
123123
Интеграция в devtools конкретного экземпляра Vuex. Например, передача `false` сообщает экземпляру хранилища Vuex, что не требуется подписываться на плагин devtools. Это будет полезно если у вас несколько хранилищ на одной странице.
124-
124+
125125
```js
126126
{
127127
devtools: false
@@ -153,8 +153,8 @@ const store = new Vuex.Store({ ...options });
153153
154154
### dispatch
155155
156-
* `dispatch(type: string, payload?: any, options?: Object)`
157-
* `dispatch(action: Object, options?: Object)`
156+
* `dispatch(type: string, payload?: any, options?: Object): Promise<any>`
157+
* `dispatch(action: Object, options?: Object): Promise<any>`
158158
159159
Запуск действия. `options` может содержать опцию `root: true` что позволяет запускать корневые (root) действия [в модулях со своим пространством имён](../guide/modules.md#пространства-имён). Возвращает Promise который разрешает все обработчики инициируемых действий. [Подробнее](../guide/actions.md)
160160
@@ -239,7 +239,7 @@ store.subscribeAction({
239239
240240
### hasModule
241241
242-
* `hasModule(path: string | Array<string>)`
242+
* `hasModule(path: string | Array<string>): boolean`
243243
244244
Проверка, не зарегистрирован ли уже модуль с заданным именем. [Подробнее](../guide/modules.md#динамическая-регистрация-модуnей)
245245

Diff for: docs/zh/api/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const store = new Vuex.Store({ ...options })
111111
112112
### strict
113113
114-
- 类型: `Boolean`
114+
- 类型: `boolean`
115115
- 默认值: `false`
116116
117117
使 Vuex store 进入严格模式,在严格模式下,任何 mutation 处理函数以外修改 Vuex state 都会抛出错误。
@@ -120,7 +120,7 @@ const store = new Vuex.Store({ ...options })
120120
121121
### devtools
122122
123-
- 类型:`Boolean`
123+
- 类型:`boolean`
124124
125125
为某个特定的 Vuex 实例打开或关闭 devtools。对于传入 `false` 的实例来说 Vuex store 不会订阅到 devtools 插件。可用于一个页面中有多个 store 的情况。
126126
@@ -155,8 +155,8 @@ const store = new Vuex.Store({ ...options })
155155
156156
### dispatch
157157
158-
- `dispatch(type: string, payload?: any, options?: Object)`
159-
- `dispatch(action: Object, options?: Object)`
158+
- `dispatch(type: string, payload?: any, options?: Object): Promise<any>`
159+
- `dispatch(action: Object, options?: Object): Promise<any>`
160160
161161
分发 action。`options` 里可以有 `root: true`,它允许在[命名空间模块](../guide/modules.md#命名空间)里分发根的 action。返回一个解析所有被触发的 action 处理器的 Promise。[详细介绍](../guide/actions.md)
162162
@@ -241,7 +241,7 @@ const store = new Vuex.Store({ ...options })
241241
242242
### hasModule
243243
244-
- `hasModule(path: string | Array<string>)`
244+
- `hasModule(path: string | Array<string>): boolean`
245245
246246
检查该模块的名字是否已经被注册。[详细介绍](../guide/modules.md#模块动态注册)
247247

0 commit comments

Comments
 (0)