(value: unknown)
| 129 | } |
| 130 | |
| 131 | function readLineMappingEntry(value: unknown): CurrentDocumentLineNumberEntry | null { |
| 132 | if (!value || typeof value !== 'object' || Array.isArray(value)) return null; |
| 133 | const record = value as ManifestRecord; |
| 134 | const visibleLine = positiveIntegerField(record.visibleLine); |
| 135 | const sourceLine = positiveIntegerField(record.sourceLine); |
| 136 | if (visibleLine === null || sourceLine === null) return null; |
| 137 | |
| 138 | const entry: CurrentDocumentLineNumberEntry = { |
| 139 | visibleLine, |
| 140 | sourceLine, |
| 141 | text: typeof record.text === 'string' ? record.text : '', |
| 142 | }; |
| 143 | const rowInSourceLine = positiveIntegerField(record.rowInSourceLine); |
| 144 | const rowsInSourceLine = positiveIntegerField(record.rowsInSourceLine); |
| 145 | if (rowInSourceLine !== null) entry.rowInSourceLine = rowInSourceLine; |
| 146 | if (rowsInSourceLine !== null) entry.rowsInSourceLine = rowsInSourceLine; |
| 147 | return entry; |
| 148 | } |
| 149 | |
| 150 | function readLineMapping(value: unknown): CurrentDocumentLineMapping | null { |
| 151 | if (!value || typeof value !== 'object' || Array.isArray(value)) return null; |
nothing calls this directly
no test coverage detected