(id: string)
| 152 | } |
| 153 | |
| 154 | async removeDoc(id: string): Promise<void> { |
| 155 | await this.getNamespaces(); |
| 156 | await deleteOuterbaseQuery(this.workspaceId, id); |
| 157 | |
| 158 | for (const namespaceId of Object.keys(this.cacheDocs)) { |
| 159 | this.cacheDocs[namespaceId] = this.cacheDocs[namespaceId].filter( |
| 160 | (d) => d.id !== id |
| 161 | ); |
| 162 | } |
| 163 | |
| 164 | this.triggerChange(); |
| 165 | } |
| 166 | |
| 167 | addChangeListener(cb: () => void): void { |
| 168 | this.cb.push(cb); |
no test coverage detected