Skip to content

Instantly share code, notes, and snippets.

@Fintan
Created December 30, 2011 14:38
Show Gist options
  • Save Fintan/1540134 to your computer and use it in GitHub Desktop.
Save Fintan/1540134 to your computer and use it in GitHub Desktop.
Simple interface example
package interfaces;
interface SampleInterface {
//Read only property
var ro(default,null):Int;
//Write only property
var wo(null,default):Int;
//property with getter and setter
var x(getX,setX):Int;
//function type that accepts a single string as an argument and returns an integer
var valueById:String -> Int;
//example methods
function sayHello(mess:String):String;
function destroy():Void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment