Open in playground
export const main = asl.deploy.asStateMachine(async () =>
{
let str = "string";
let num = 42;
let bool = true || false;
let object = { str, num, bool };
let object2 = { str: "string", num: 33, inner: object };
let arrayOfNumbers = [1, 2, 3, 4, 5];
let arrayOfObjects = [{ left: 1, right: 2 }, { left: 3, right: 4 }, { left: 5, right: 6 }];
return { arrayOfNumbers, arrayOfObjects, object2 };
});
Open in playground
export const main = asl.deploy.asStateMachine(async () =>
{
let str = "string";
let num = 42;
let bool = true || false;
let object = { str, num, bool };
let array = [str, num, bool, object];
return array;
});
Open in playground
export const main = asl.deploy.asStateMachine(async () =>
{
let arr: [];
let two: string;
return two;
});
Open in playground
export const main = asl.deploy.asStateMachine(async () =>
{
let _undefined = undefined;
});
Open in playground
export const main = asl.deploy.asStateMachine(async () =>
{
let _null = null;
});
Open in playground
export const main = asl.deploy.asStateMachine(async () =>
{
let arr = [1, 2, 3, 4, 5]
let two = arr[1];
arr[1] = arr[3];
arr[3] = two;
return arr; //returns [1, 4, 3, 2, 5]
});
Open in playground
export const main = asl.deploy.asStateMachine(async () =>
{
let str = asl.states.format("hello {}", "world")
let num = asl.states.format("answer is {}", 42);
let combined = asl.states.format("1: {}\n 2: {}", str, num);
let arr = asl.states.array(str, num, combined);
return arr;
});