Re: [heycam/webidl] Should EnforceRange be allowed on consts and return types? (#842)

Not a JS dev by any means, but I thought you can write a lot of weird code in JS. Can't you pass the same object where different WebIDL dictionary types are required, for example? Does that make it less valuable to define different dictionary types then?
My understanding is that WebIDL spec defines what is *expected* in objects passed by the user. It can't enforce what these things are, since JS is weakly and dynamically typed. From this perspective, a typedef for an integer/flag does increase clarity and quality of a spec.

-- 
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/842#issuecomment-668277303

Received on Monday, 3 August 2020 22:46:30 UTC