Definir window.location com o TypeScript
Estou recebendo um erro com o seguinte código TypeScript:
///<reference path='../../../Shared/typescript/jquery.d.ts' />
///<reference path='../../../Shared/typescript/jqueryStatic.d.ts' />
function accessControls(action: Action) {
$('#logoutLink')
.click(function () {
var $link = $(this);
window.location = $link.attr('data-href');
});
}
Estou recebendo um erro vermelho sublinhado para o seguinte:
$link.attr('data-href');
A mensagem diz:
Cannot convert 'string' to 'Location': Type 'String' is missing property 'reload' from type 'Location'
Alguém sabe o que isso significa?