Documentation
    Preparing search index...

    Type Alias MockClassService

    MockClassService: MockService<MockClassState> & {
        assign(windowId: string, classNumber?: number): boolean;
    }

    Class mock with the shell-side assignment control.

    Type Declaration

    • assign: function
      • Push class.assigned to a window once per lifecycle.

        Parameters

        • windowId: string

          Recipient window (must be registered with the runtime).

        • OptionalclassNumber: number

          Non-negative integer; defaults to classFor/defaultClass.

        Returns boolean

        false when the window already received its envelope, the value is not a non-negative integer, or no delivery path exists.

    const service = createMockClassService();
    service.onRegistered?.(runtimeContext);
    service.assign('w1', 2);