Re: [heycam/webidl] add a type to represent the undefined value (#60)

```ts
function test(): void {
  return undefined;
}
```
is fine per https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABFApgZygCgJQC5EBucMAJogN4BQiiATilCLUuCSsDGCiQNyUC+QA. And it would be somewhat weird if it was not as a function lacking a return statement and one returning undefined are identical in JavaScript.

If you use IDL for other languages you can continue to assume that a function whose return type is exclusively undefined returns nothing, just like it returns "nothing" in JavaScript.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/60#issuecomment-676029582

Received on Wednesday, 19 August 2020 09:31:51 UTC