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

    Interface Blocks

    interface Blocks {
        _blocks: Record<string, VM.Block>;
        forceNoGlow: boolean;
        runtime: Runtime;
        cacheCompileError(blockId: string, error: unknown): void;
        cacheCompileResult(blockId: string, value: unknown): void;
        duplicate(): VM.Blocks;
        emitProjectChanged(): void;
        getBlock(id: string): VM.Block | undefined;
        getBranch(id: string, branchNum?: number): string | null;
        getCachedCompileResult(
            blockId: string,
        ): { success: boolean; value: any } | null;
        getFields(block: VM.Block): Record<string, Field> | null;
        getInputs(block: VM.Block): Record<string, Input> | null;
        getMutation(
            block: VM.Block,
        ): ProcedureCallMutation | ProcedurePrototypeMutation | null;
        getNextBlock(id: string): string | null;
        getOpcode(block: VM.Block): string | null;
        getProcedureDefinition(procedureCode: string): string | null;
        getProcedureParamNamesAndIds(procedureCode: string): [string[], string[]];
        getProcedureParamNamesIdsAndDefaults(
            procedureCode: string,
        ): [string[], string[], unknown[]];
        getScripts(): string[];
        getTopLevelScript(id: string): string | null;
        populateProcedureCache(): void;
        resetCache(): void;
        toXML(): string;
    }
    Index

    Properties

    _blocks: Record<string, VM.Block>
    forceNoGlow: boolean
    runtime: Runtime

    Methods

    • Parameters

      • blockId: string
      • error: unknown

      Returns void

    • Parameters

      • blockId: string
      • value: unknown

      Returns void

    • Parameters

      • id: string
      • OptionalbranchNum: number

      Returns string | null

    • Get the cached compilation result of a block.

      Parameters

      • blockId: string

      Returns { success: boolean; value: any } | null

      Cached success or error, or null if there is no cached value.

    • Parameters

      • procedureCode: string

      Returns string | null

    • Parameters

      • procedureCode: string

      Returns [string[], string[]]

    • Parameters

      • procedureCode: string

      Returns [string[], string[], unknown[]]