Skip to content

[AI Improvement] [Task] Remove dead EmulatedTrigger and waitForBody cluster from functionsEmulatorShared.ts - #11213

Draft
joehan wants to merge 3 commits into
mainfrom
ai-improve-568084058-task-remove-dead-emulatedtrigger-an
Draft

joehan wants to merge 3 commits into
mainfrom
ai-improve-568084058-task-remove-dead-emulatedtrigger-an

Conversation

@joehan

@joehan joehan commented Sep 30, 2026

Copy link
Copy Markdown
Member

Resolves Buganizer b/568084058

Proposed Improvement

Removes dead cluster of legacy in-process function discovery and execution helpers from src/emulator/functionsEmulatorShared.ts:

  • getEmulatedTriggersFromDefinitions: Unused legacy helper with zero callers across the codebase.
  • class EmulatedTrigger: Only instantiated by getEmulatedTriggersFromDefinitions, transitively dead.
  • interface EmulatedTriggerMap: Only used as return type of getEmulatedTriggersFromDefinitions, transitively dead.
  • interface FunctionsRuntimeArgs: Zero references across the codebase.
  • waitForBody: Unused helper with zero callers across the codebase.
  • Unused imports: lodash, express, CloudFunction from firebase-functions, and InvokeRuntimeOpts from ./functionsEmulator.

This removes 74 lines of unreachable code and cleans up unnecessary dependencies loaded when the functions emulator starts.

Verification

  • npm run build: Built cleanly.
  • npm run lint:quiet: Passed with no errors or unused import warnings.
  • npm run test:compile: Full type-check passed cleanly.
  • npx mocha 'src/emulator/functions*.spec.ts': All 50 tests passed.
  • Codebase grep confirmed 0 occurrences of the deleted symbols remain.

…ter from functionsEmulatorShared (b/568084058)
@joehan joehan self-assigned this Sep 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request cleans up unused imports, interfaces, classes, and helper functions from src/emulator/functionsEmulatorShared.ts. Specifically, it removes the lodash, express, and CloudFunction imports, the EmulatedTriggerMap and FunctionsRuntimeArgs interfaces, the EmulatedTrigger class, and the getEmulatedTriggersFromDefinitions and waitForBody helper functions. There are no review comments, and I have no additional feedback to provide.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants