(filePath: string, newContent: string)
| 75 | } |
| 76 | |
| 77 | updateFile(filePath: string, newContent: string) { |
| 78 | const documents = this.documents.get(); |
| 79 | const documentState = documents[filePath]; |
| 80 | |
| 81 | if (!documentState) { |
| 82 | return; |
| 83 | } |
| 84 | |
| 85 | const currentContent = documentState.value; |
| 86 | const contentChanged = currentContent !== newContent; |
| 87 | |
| 88 | if (contentChanged) { |
| 89 | this.documents.setKey(filePath, { |
| 90 | ...documentState, |
| 91 | value: newContent, |
| 92 | }); |
| 93 | } |
| 94 | } |
| 95 | } |
no outgoing calls
no test coverage detected