()
| 33 | } |
| 34 | |
| 35 | export function useEditDoc() { |
| 36 | const editBlock = useEditBlock(); |
| 37 | return ( |
| 38 | docConfig?: { uses?: string } | { name: string; sourceFile?: string }, |
| 39 | ) => { |
| 40 | if (!docConfig) { |
| 41 | editBlock(undefined, undefined); |
| 42 | return; |
| 43 | } |
| 44 | if ("name" in docConfig) { |
| 45 | editBlock(undefined, docConfig.sourceFile); |
| 46 | } else { |
| 47 | editBlock(docConfig.uses, undefined); |
| 48 | } |
| 49 | }; |
| 50 | } |
| 51 | |
| 52 | export function useOpenRule() { |
| 53 | const editBlock = useEditBlock(); |
no test coverage detected