Re: [sensors] Undefined values makes GS a pain to work with using TypeScript

So actually, in VSCode which is becoming quite popular, you can use TS for code checking of pure JavaScript files by adding a ```// @ts-check``` comment before the code.

I see that you can work around it with your idea above, especially if you have a derived class, but that requires to use TypeScript and not just the TS checker on regular JavaScript code. 

Also I would requires users to define something like that XYZSensor type and use that type in their callbacks. I don't think that is a nice experience and I don't think it would be obvious to most.

If we can solve this in another way, I think that would be much preferable

-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/sensors/issues/269#issuecomment-330461536 using your GitHub account

Received on Tuesday, 19 September 2017 08:02:26 UTC