From 87eed18ee34dfe98f3c51dc67c8f2eef0d8e1550 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 16 Sep 2026 23:53:37 -0700 Subject: [PATCH] test(relay): put the countingIterator SAFETY: directive on the line oxlint flags The diagnostic points at the `return {` that opens the object literal, not at the `} as IterableIterator` that closes it, so disable-next-line has to sit above the statement. --- src/relay/relay-hot-path-operation-counts.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/relay/relay-hot-path-operation-counts.test.ts b/src/relay/relay-hot-path-operation-counts.test.ts index e0f38566529..1c927cc6592 100644 --- a/src/relay/relay-hot-path-operation-counts.test.ts +++ b/src/relay/relay-hot-path-operation-counts.test.ts @@ -16,6 +16,7 @@ class CountingMap extends Map { const bump = (): void => { this.visits++ } + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the literal returned here implements next() and [Symbol.iterator](), which is the whole protocol a for..of over this wrapper reaches; no other IterableIterator member is ever called. return { next(): IteratorResult { const r = inner.next() @@ -27,7 +28,6 @@ class CountingMap extends Map { [Symbol.iterator]() { return this } - // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the literal above implements next() and [Symbol.iterator](), which is the whole protocol a for..of over this wrapper reaches; no other IterableIterator member is ever called. } as IterableIterator }