Passed
Pull Request — master (#223)
by Daniel
01:36
created

scripts/main.ts   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 19
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 15
mnd 1
bc 1
fnc 0
dl 0
loc 19
rs 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import "animate.css";
2
3
import checkValidText from "./classes/ValidText/classValidText";
4
import sendForm from "./classes/ProcessInputForm/classProcessInputForm";
5
6
const initialize = (): void => {
7
  const textInput = window.document.getElementById(
8
    "bilinformasjon"
9
  ) as HTMLInputElement;
10
  const textForm = window.document.getElementById("regnrform");
11
12
  if (textInput && textForm) {
13
    textInput.addEventListener("input", () => checkValidText);
14
    textForm.addEventListener("submit", () => sendForm);
15
  }
16
};
17
18
initialize();
19