KS5020
Em um arquivo strict, um valor cujo tipo o verificador não consegue provar. Escreva o tipo onde o valor é declarado. Em um arquivo strict é um erro, e o script não roda até que seja corrigido:
<strict />
<let name="names" value="[]" /> <!-- error: write the item type, such as $names: string[] = [] -->
<let name="found" value="null" /> <!-- error: write its type: $found: string? = null -->
<let name="data" type="any" value="'{"n": 1}'->convert(from: json)" />
<let name="n" value="$data.n" /> <!-- error: the checker can't tell what $n holds; write $n: int = $data.n -->strict
$names = [] // error: write the item type, such as $names: string[] = []
$found = null // error: write its type: $found: string? = null
$data: any = '{"n": 1}'->convert(from: json)
$n = $data.n // error: the checker can't tell what $n holds; write $n: int = $data.nO mesmo código aponta uma variável que recebe valores de tipos diferentes, um parâmetro de lambda sem nada de onde tirar um tipo (escreva fn(n: number) => ...), uma função cujo resultado não dá para deduzir (escreva fn first(items: list): string) e um campo sem tipo e sem valor padrão.