Skip to content

Commit e5113c3

Browse files
justin808claude
andcommitted
Fix knip unused export warning for test utility function
Added @public JSDoc tag to disableHttp2() test utility function. This function is intentionally exported for use in tests (see tests/worker.test.ts) but knip's --production mode doesn't see test file usage, causing a false positive unused export warning. The @public tag tells knip this is an intentional public API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 038e62c commit e5113c3

File tree

1 file changed

+5
-1
lines changed
  • packages/react-on-rails-pro-node-renderer/src

1 file changed

+5
-1
lines changed

packages/react-on-rails-pro-node-renderer/src/worker.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ function assertAsset(value: unknown, key: string): asserts value is Asset {
9292
// Remove after this issue is resolved: https://github.com/fastify/light-my-request/issues/315
9393
let useHttp2 = true;
9494

95-
// Call before any test using `app.inject()`
95+
/**
96+
* Test utility to disable HTTP/2 before calling `app.inject()`
97+
* Workaround for https://github.com/fastify/light-my-request/issues/315
98+
* @public
99+
*/
96100
export const disableHttp2 = () => {
97101
useHttp2 = false;
98102
};

0 commit comments

Comments
 (0)