Describe the solution you'd like
For someone who's learning about the internals of node, it's useful to know exactly where in the codebase certain functions are implemented. I think it would be nice if the node docs linked say a function (like setTimeout) to the line in source code (on Github perhaps) where that function is implemented.
Rust doc does this and I think it's a really nice feature that helps those wishing to dig deeper but isn't so intrusive to confuse or overwhelm newcomers.


@nodejs/documentation @nodejs/website
we wouldn't be able to reliably do this unless we switched to some form of inline documentation. at a minimum some tag like // @source timers.setImmediate would be needed.
Live example from Rust: try_reserve.
Rails does something similar: Rails.env.
Links to GitHub are appealing, but would require the build process to get the final commit hash (example from Rails: https://github.com/rails/rails/commit/fc5dd0b85189811062c85520fd70de8389b55aeb). Rust appears to take a different path: produce a syntax highlighted set of pages that is published with the documentation, and provide links into that.
While this is clearly a non-trivial amount of work, I agree that it would be very useful, and would be fun to develop. I'll try to create a small proof of concept in the next week or two.
@rubys cool! Let me know if I can help in any way.
Awesome. Thanks so much for working on this @rubys!
Most helpful comment
Live example from Rust: try_reserve.
Rails does something similar: Rails.env.
Links to GitHub are appealing, but would require the build process to get the final commit hash (example from Rails: https://github.com/rails/rails/commit/fc5dd0b85189811062c85520fd70de8389b55aeb). Rust appears to take a different path: produce a syntax highlighted set of pages that is published with the documentation, and provide links into that.
While this is clearly a non-trivial amount of work, I agree that it would be very useful, and would be fun to develop. I'll try to create a small proof of concept in the next week or two.