0

Whenever I try to look at JavaScript method definitions like Math.max() for example, I'll usually end up in a .d.ts file and I don't know where to go from there to view the actual method implementation.

Is there a way to inspect the source inside the JS v8 engine?

4
  • 2
    You've take a look at JS engine's source code to view the actual implementation. Commented Mar 2, 2020 at 9:54
  • There is no such thing as JS source code as JS runs via some engine like V8 which is written in C++, but as Teemu said, you can read the C++ implementation and see what it does Commented Mar 2, 2020 at 10:25
  • Thanks for clarifying @mark-shulhin. I will update the question Commented Mar 2, 2020 at 17:47
  • 1
    No, editors are not capable to show the compiled source code of the native implementations. If you want to see such an implementation, you have go to online, some JS engines are open source projects, search for the source and you'll find the method implementation. Commented Mar 3, 2020 at 20:10

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.