Got it! Here's the way you can use the function in question:
function(param1, param2){
// param 1 is undefined for intellisense at this point
param1 = intellisense.undefinedWithCompletionsOf(window); // can set it to any type instead of window
param1. // shows intellisense for window object
}