Skip to content

Commit 5e3846e

Browse files
RaananWCopilot
andcommitted
TC39 node-editor-tooling: defer WebCamInputBlock self-reference in decorator
Wrap the WebCamInputBlock._WebCamSourceManager options in a getter so the class self-reference inside the @editableInPropertyPage arguments is evaluated lazily, avoiding TS2449 (class used before its declaration) under TC39 decorator evaluation order. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 127c067 commit 5e3846e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/tools/smartFiltersEditorControl/src/configuration/editorBlocks/webCamInputBlock

packages/tools/smartFiltersEditorControl/src/configuration/editorBlocks/webCamInputBlock/webCamInputBlock.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ export class WebCamInputBlock extends InputBlock<ConnectionPointType.Texture> {
125125
*/
126126
@editableInPropertyPage("Source", PropertyTypeForEdition.List, "PROPERTIES", {
127127
notifiers: { update: true },
128-
options: WebCamInputBlock._WebCamSourceManager.onSourcesLoaded as Observable<IEditablePropertyListOption[]>,
128+
get options() {
129+
return WebCamInputBlock._WebCamSourceManager.onSourcesLoaded as Observable<IEditablePropertyListOption[]>;
130+
},
129131
valuesAreStrings: true,
130132
})
131133
public set webcamSourceId(id: string) {

0 commit comments

Comments
 (0)