4 ms·
Or at the very least, library documentation really needs to clearly specify the types of parameters and return values. I'm positively surprised when I come acr
by mbrock 11y ago
Or at the very least, library documentation really needs to clearly specify the types of parameters and return values.
I'm positively surprised when I come across a JavaScript API whose documentation actually specifies this very basic information.
Coming from the static typing world, it's astounding...
- mstade 11y ago+1 Documentation in the web development world is usually very good with the introduction, getting you excited; but terrible when it comes to reference, the day-to-day type docs.
- lloyd-christmas 11y agoWhile not condoning crappy documentation, the intro is usually the important part. After that, I find stepping through code to be more productive than reading documentation, exclusive of massive frameworks which tend to be fairly well documented anyway.
- Maarten88 11y agoYes. And, having worked with typescript, its quite annoying how poor most typings files are that you get from the definitelytyped repository. It's better than nothing, but they are unversioned (so always behind) and often very incomplete. I agree with the author: types are there anyway, typescript seems to work well enough and has traction now, so please, if you write a library: add those type annotations bottom-up in the library and let typescript generate a nice .d.ts declaration file and standardized module stub around that final javascript library.
- moron4hire 11y agoI don't agree. Bad documentation is worse than no documentation. At least with no documentation, I start with the expectation that I have to figure everything out on my own.
- lloyd-christmas 11y agoOr... at least accept the pull requests that have them cough async cough
- gexla 11y agoDo you have an example which has stood out for you?