Fix TypeScript module declaration

Now the TypeScript definition is correct and works well in Visual Studio