Skip to content

Fix custom element WorkerService to match init() refactor#641

Open
zhaoyuheng200 wants to merge 2 commits into
google-ai-edge:mainfrom
zhaoyuheng200:fix/custom-element-worker-init
Open

Fix custom element WorkerService to match init() refactor#641
zhaoyuheng200 wants to merge 2 commits into
google-ai-edge:mainfrom
zhaoyuheng200:fix/custom-element-worker-init

Conversation

@zhaoyuheng200
Copy link
Copy Markdown
Contributor

@zhaoyuheng200 zhaoyuheng200 commented May 16, 2026

Summary

  • The custom_element/worker_service.ts (used via fileReplacements in angular.json during the custom_element build) was not updated when 49aa6a8 refactored WorkerService to use a lazy init() method instead of constructor initialization.
  • This causes ng build custom_element to fail with TS2339: Property 'init' does not exist on type 'WorkerService', which blocks npm package builds.

Test plan

  • Run ng build custom_element — should succeed without TS errors
  • Run npm run build-npm — should produce the full npm package in custom_element_npm/dist/

The custom_element/worker_service.ts (used as a fileReplacement during
the custom_element build) was not updated when 49aa6a8 refactored
WorkerService to use a lazy init() method instead of constructor
initialization. This breaks `ng build custom_element`.
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.

1 participant