// @ts-<directive>
comments JS-029529 className={styles.input}
30 />
31 <label
32 // @ts-ignore33 part={"label"}
34 className={styles.label}
35 >
39 <div className={styles.passcodeDigitWrapper}>
40 <input
41 {...props}
42 // @ts-ignore43 part={"input passcode-input"}
44 name={props.name + index.toString(10)}
45 type={"text"}
10const Headline = ({ children }: Props) => {
11 return (
12 <h1
13 // @ts-ignore14 part={"headline"}
15 className={styles.title}
16 >
32 </span>
33 <span
34 id="errorMessage"
35 // @ts-ignore36 part={"error-text"}
37 >
38 {code ? t(`errors.${code}`) : error ? error.message : null}
22
23 return (
24 <section
25 // @ts-ignore26 part={"error"}
27 className={styles.errorMessage}
28 hidden={!error}
TypeScript provides several directive comments that can be used to alter how it processes files. Using these to suppress TypeScript Compiler Errors reduces the effectiveness of TypeScript overall.
However, if you must keep them, you can add an explanation next to your directives.
The directive comments supported by TypeScript are:
// @ts-expect-error
// @ts-ignore
// @ts-nocheck
// @ts-check
// @ts-ignore
user.login()
// @ts-ignore - this is ok because <reason>
user.login()