Make window compatible with ts 3.6
#2984
+3
−4
Merged