Skip to content

Commit

Permalink
test index file
Browse files Browse the repository at this point in the history
  • Loading branch information
mayarajan3 committed Jul 1, 2024
1 parent f7fb014 commit 26e491d
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion extensions/src/simple_example/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArgumentType, BlockType, BlockUtilityWithID, Environment, ExtensionMenuDisplayDetails, Language, Menu, SaveDataHandler, block, buttonBlock, extension, tryCastToArgumentType, untilTimePassed, scratch } from "$common";
import { ArgumentType, BlockType, BlockUtilityWithID, Environment, ExtensionMenuDisplayDetails, Language, Menu, SaveDataHandler, block, buttonBlock, extension, tryCastToArgumentType, untilTimePassed, scratch, versions, VersionedArgTransformer } from "$common";
import jibo from "./jibo.png";
import five from "./five.png";

Expand All @@ -16,6 +16,7 @@ const details: ExtensionMenuDisplayDetails = {
tags: ["PRG Internal"],
}


export default class SimpleTypescript extends extension(details, "ui", "customSaveData", "indicators") {
count: number = 0;
value: number = 4;
Expand Down Expand Up @@ -51,6 +52,33 @@ export default class SimpleTypescript extends extension(details, "ui", "customSa
console.log(value);
}

// @versions({
// type: "command",
// text: `Set selfie image as costume`,
// })
// setCostume() {
// // this.addCostume(target, this.lastProcessedImage, "add and set")
// }

@(scratch.command`Test ${"number"} and ${"number"} and ${"number"} and ${"number"}`)
@(versions([
{transform: ( ({arg}) => [arg('0'), arg('1'), { value: 4 }, arg('2')] ) satisfies VersionedArgTransformer,
previousName: 'returnValue2',
previousType: 'reporter'
},
{transform: ( ({arg}) => [arg('1'), arg('0'), arg('2'), arg('3')] ) satisfies VersionedArgTransformer,
}
]))
async returnValue(x: number, y: number, z: number, a: number) {
//return true;
}
// @(scratch.reporter`Oop ${"number"} and ${"number"} and ${"number"}`)
// returnValue2(x: number, y: number, z: number) {
// return 10;
// }
@(scratch.command`
Indicate ${{ type: "string", defaultValue: "Howdy!" }}
as ${{ type: "string", options: ["error", "success", "warning"] }}
Expand Down

0 comments on commit 26e491d

Please sign in to comment.