@turbowarp/types-tw
    Preparing search index...

    Interface BlockUtility

    interface BlockUtility {
        _nowObj: { now(): number };
        nowObj: { now(): number };
        runtime: Runtime;
        sequencer: Sequencer;
        stackFrame: StackFrame;
        startHats: (
            opcode: string,
            matchFields?: Record<string, unknown>,
            target?: RenderedTarget,
        ) => Thread[] | undefined;
        target: RenderedTarget;
        thread: Thread;
        getParam(name: string): ScratchCompatibleValue;
        getProcedureParamNamesAndIds(): [string[], string[]];
        getProcedureParamNamesIdsAndDefaults(): [string[], string[], string[]];
        initParams(): void;
        ioQuery<Device extends keyof IODevices>(
            device: Device,
            func: keyof IODevices[Device],
            args: unknown[],
        ): unknown;
        pushParam(name: string, value: ScratchCompatibleValue): void;
        stackTimerFinished(): boolean;
        stackTimerNeedsInit(): boolean;
        startBranch(branchNumber: number, isLoop: boolean): void;
        startStackTimer(milliseconds: number): void;
        stopAll(): void;
        stopOtherTargetThreads(): void;
        stopThisScript(): void;
        yield(): void;
        yieldTick(): void;
    }
    Index

    Properties

    _nowObj: { now(): number }
    nowObj: { now(): number }
    runtime: Runtime
    sequencer: Sequencer
    stackFrame: StackFrame
    startHats: (
        opcode: string,
        matchFields?: Record<string, unknown>,
        target?: RenderedTarget,
    ) => Thread[] | undefined

    Use instead of runtime.startHats inside blocks.

    thread: Thread

    Methods

    • Returns [string[], string[], string[]]

    • Parameters

      • branchNumber: number
      • isLoop: boolean

      Returns void