Type annotations

Let assignments can be written with a type annotation after the name.

let 代入は、名前の後に型アノテーションを付けて書くことができます。

Type annotations may be useful for documentation purposes, but they do not change how Gleam type checks the code beyond ensuring that the annotation is correct.

型アノテーションはドキュメンテーション目的に役立ちますが、アノテーションが正しいことを保証するだけで、Gleam がコードを型チェックする方法は変わりません。

Typically Gleam code will not have type annotations for assignments.

通常、Gleam のコードには代入のための型アノテーションはありません。

Try changing a type annotation to something incorrect to see the compile error.

コンパイルエラーを確認するために、型アノテーションを正しくないものに変更してみてください。