( hydrationInfo: DehydratedView, noOffsetIndex: number, )
| 78 | * @returns an RNode that corresponds to the instruction index |
| 79 | */ |
| 80 | export function locateI18nRNodeByIndex<T extends RNode>( |
| 81 | hydrationInfo: DehydratedView, |
| 82 | noOffsetIndex: number, |
| 83 | ): T | null | undefined { |
| 84 | const i18nNodes = hydrationInfo.i18nNodes; |
| 85 | if (i18nNodes) { |
| 86 | return i18nNodes.get(noOffsetIndex) as T | null | undefined; |
| 87 | } |
| 88 | return undefined; |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * Attempt to locate an RNode by a path, if it exists. |
no test coverage detected
searching dependent graphs…