LoginSignup
0
0

More than 5 years have passed since last update.

関数メンバについて

Last updated at Posted at 2013-10-09
public showMessage(): void {
  alert(this.message);
}

voidは戻り値の型

インターフェース

interface IEngine {
  maxSpeed: number;
  move(speed: number): { message: string; }; //関数メンバ
}

上記関数メンバの型注釈は、オブジェクトリテラル(string型のmessageメンバを持つオブジェクトを返す
関数

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0