gajus/flow-runtime

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Add assertions when implicitly returning from a function #2

phpnode posted onGitHub

Currently if a function implicitly returns undefined (by leaving the function without an explicit return statement) we won't generate a check for it, e.g:

function foo (): string {
  // no return
}

currently compiles to:

function foo () {
  const _returnType = t.return(t.string()); 
  // no return
}

We should insert a call to _returnType.assert(undefined) at these points.


@issuehunt has funded $20.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

Fund this Issue

$20.00
Funded
Only logged in users can fund an issue

Pull requests

Recent activities

vlsergey submitted an output to  gajus/ flow-runtime# 2
over 4 years ago
issuehunt funded 20.00 for gajus/flow-runtime# 2
over 5 years ago