( hookName: H, parameters: Parameters<FunctionPluginHooks[H]>, replaceContext?: ReplaceContext | null, skipped?: ReadonlySet<Plugin> | null )
| 139 | |
| 140 | // chains, first non-null result stops and returns |
| 141 | hookFirst<H extends AsyncPluginHooks & FirstPluginHooks>( |
| 142 | hookName: H, |
| 143 | parameters: Parameters<FunctionPluginHooks[H]>, |
| 144 | replaceContext?: ReplaceContext | null, |
| 145 | skipped?: ReadonlySet<Plugin> | null |
| 146 | ): Promise<ReturnType<FunctionPluginHooks[H]> | null> { |
| 147 | return this.hookFirstAndGetPlugin(hookName, parameters, replaceContext, skipped).then( |
| 148 | result => result && result[0] |
| 149 | ); |
| 150 | } |
| 151 | |
| 152 | // chains, first non-null result stops and returns result and last plugin |
| 153 | async hookFirstAndGetPlugin<H extends AsyncPluginHooks & FirstPluginHooks>( |
no test coverage detected