jsr icon indicating copy to clipboard operation
jsr copied to clipboard

Fast check unable to infer type from `return` expression

Open marvinhagemeister opened this issue 1 year ago • 1 comments

These cases are trivial to detect based on the literal of the return expression. We currently fail all of them with a "missing retunr type" error whereas we be able to detect all of these.

export function strReturn() {
  return "foo";
}

export async function asyncStrReturn() {
  return "foo";
}

export function numReturn() {
  return 2;
}

export async function asyncNumReturn() {
  return 2;
}

marvinhagemeister avatar Apr 07 '24 10:04 marvinhagemeister

https://github.com/denoland/deno_graph/issues/459

lucacasonato avatar Apr 26 '24 19:04 lucacasonato