ブックマーク / qiita.com/macololidoll (1)

  • TypeScriptのNever型とは? - Qiita

    TypeScriptのDocumentを読んでいてNever型にすごく引っかかり2日潰したものです! やっと理解につながったのでNever型について書きます。 では、まずNever型とはなんなのか 以下公式引用です。 The never type represents the type of values that never occur. For instance, never is the return type for a function expression or an arrow function expression that always throws an exception or one that never returns; Variables also acquire the type never when narrowed by any type guards t

    TypeScriptのNever型とは? - Qiita
    lbtmplz
    lbtmplz 2020/09/19
  • 1