Stedi-Public-Archive / ts2asl

TypeScript to AWS ASL transpiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: ts2asl playground doesn't properly infer type information on Choice states

OlafConijn opened this issue · comments

the following code retains type information (used in choice state to create Numeric comparison).
however on the playground the type information seems to get lost and it will default to String comparison

export const numericComparison = asl.deploy.asStateMachine(async () => {
  const condition = 42;
  const items = [2, 42, 3];
  const listWithRetunrned = items.map(item => {
    if (item === condition) {
      return { returned: item };
    }
  });
  const item = listWithRetunrned.filter(x => x.returned);
  return item;
});