Collect runtime type information 😻 of your JavaScript code.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
images Add screenshot Sep 10, 2017
LICENSE Initial commit Sep 10, 2017 Update readme Jan 12, 2018
demo.js Update readme Jan 12, 2018
example.js Add screenshot Sep 10, 2017
package.json Add package.json Jan 12, 2018
template.html Update Node version in Readme Jan 12, 2018

Runtime Type Information

Collect runtime type information 😻 of your JavaScript code.

This is a demo how you could use V8's new type information feature.

V8 can now collect type information at runtime. V8 is Google’s open source JavaScript engine. Chrome, Node.js, and many other applications use V8. This type profiler is built into the engine, the information is not statically inferred.

The V8 inspector protocol provides access to the type information. Since the inspector is available in Node (see Node Documentation), it's easy to write modules that utilize type information. This repo is a very simple demo of this.

Image of Demo

Compare the runtime type information with your TypeScript or Flow annotations. Or use them to find bugs and performance issues.

For technical details on type profile implementation in V8, see and the Design Doc.

Demo based on @hashseed's demo for code coverage.


Run npm start, then open localhost:8080.

Note: currently needs Node master, TypeProfile is not in 9.4. You can build from source or download a nightly build.