Why not allow for C extensions to Javascript, and create a compiler capable of easy generation of these extensions with optional typing?
An example of this would be Cython for Python, which lets you get to C speed within 1 to 5% slow down due to interfacing with Python, and it has you write in a Pythonic dialect of C/C++.