Olá, sou novo na programação e estou tentando fazer um exercício de typescript, onde quero apenas capturar o valor de um input, fiz um curso no youtube de typescript mas ele não ensinava a mexer com o DOOM. Recebo o seguinte erro na variável numero: Argument of type 'string' is not assignable to parameter of type 'HTMLInputElement'
Typescript
class Game {
public button:HTMLInputElement
public numero:HTMLInputElement
constructor(button:HTMLInputElement,numero:HTMLInputElement){
this.button=button
this.numero=numero
this.button.onclick = function() {
console.log("Teste: "+numero);
}
}
}
let numero = (document.querySelector("#numero") as HTMLInputElement).value
const teste = new Game(document.querySelector('button') as HTMLInputElement, numero);
teste;
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<input id="numero">
<button>Chutar!</button>
<script src="../build/jogo-de-numeros.js"></script>
</body>
</html>