TypeScript function arrow expression returning object February 23, 2023 by Tarik You can add parens: () => ({x:1,y:2}) This makes the parser understand that the { is not the beginning of a code block.