1# Switching off type checks with in-place comments is not allowed 2 3Rule ``arkts-strict-typing-required`` 4 5**Severity: error** 6 7Type checker in ArkTS is not optional, the code must be explicitly and 8correctly typed to be compiled and run. "Suppressing" type checker in-place 9with special comments is not allowed. In particular, ``@ts-ignore`` and 10``@ts-nocheck`` annotations are not supported. 11 12 13## TypeScript 14 15 16``` 17 18 // @ts-nocheck 19 // ... 20 // Some code with switched off type checker 21 // ... 22 23 let s1: string = null // No error, type checker suppressed 24 25 // @ts-ignore 26 let s2: string = null // No error, type checker suppressed 27 28``` 29 30## ArkTS 31 32 33``` 34 35 let s1: string | null = null // No error, properly types 36 let s2: string = null // Compile-time error 37 38``` 39 40## See also 41 42- Recipe 008: Use explicit types instead of ``any``, ``unknown`` (``arkts-no-any-unknown``) 43- Recipe 145: Strict type checking is enforced (``arkts-strict-typing``) 44 45 46