Skip to content

Commit

Permalink
Fix type of allScriptsByOpcode callback first argument
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Dec 27, 2024
1 parent c2bb241 commit d5dcaa7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion types/scratch-vm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ declare namespace VM {
forceNoGlow: boolean;
}

interface RuntimeScriptCache {
container: Blocks;
blockId: string;
fieldsOfInputs: Record<string, Field>;
}

interface BaseVariable {
id: string;
name: string;
Expand Down Expand Up @@ -1202,7 +1208,7 @@ declare namespace VM {

allScriptsDo(callback: (blockId: string, target: Target) => void, target?: Target): void;

allScriptsByOpcodeDo(opcode: string, callback: (blockId: string, target: Target) => void, target?: Target): void;
allScriptsByOpcodeDo(opcode: string, callback: (script: RuntimeScriptCache, target: Target) => void, target?: Target): void;

sequencer: Sequencer;

Expand Down

0 comments on commit d5dcaa7

Please sign in to comment.