(message: string)
| 91 | // extracting arktype errors for inline display based on: |
| 92 | // https://github.com/usernamehw/vscode-error-lens/blob/019d29b010f85ebb6e25c5f7f8ffda83479bfda0/src/utils/extUtils.ts#L184 |
| 93 | const applyReplacements = (message: string): string => { |
| 94 | for (const transformation of errorLensReplacements) { |
| 95 | const matchResult = transformation.matcher.exec(message) |
| 96 | if (matchResult) { |
| 97 | message = transformation.message |
| 98 | // replace groups like $0 and $1 with groups from the match |
| 99 | for (let groupIndex = 0; groupIndex < matchResult.length; groupIndex++) { |
| 100 | message = message.replace( |
| 101 | new RegExp(`\\$${groupIndex}`, "gu"), |
| 102 | matchResult[Number(groupIndex)] |
| 103 | ) |
| 104 | } |
| 105 | |
| 106 | return message |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | return message |
| 111 | } |
| 112 | |
| 113 | const getDiagnostics = async ( |
| 114 | tsLanguageService: Monaco.languages.typescript.TypeScriptWorker, |
no test coverage detected
searching dependent graphs…