関数の型
パラメータの型アノテーション
// variable annotation
var sampleVariable: { bar: number }
// function parameter annotation
function foo(sampleParameter: { bar: number }) { }戻り値の型アノテーション
interface Foo {
foo: string;
}
// Return type annotated as `: Foo`
function foo(sample: Foo): Foo {
return sample;
}オプションパラメータ
オーバーロード
関数の宣言
最終更新