ActionScript type hinting?

Hi,

is there somehow possible to hint method parameter type or class? If I have method "addSomething(enumValue:String)" and enum class EnumValues, then how can I say to IDE use that enum class when trying to autocomplete method argument?

Cheers,
Tanka

2 comments
Comment actions Permalink

Hi Tanka,

I'm not aware of such functionality, but we have smart completion for "typesafe enums", e.g.

 
package {
class Asdf {
    public function Asdf() {
        var p:Point = local(/*Ctrl+Shift+Space here*/); 
    }

    function local(p:Point) {
    }
}
}

public class Point {
    public static var point:Point = new Point();
    public static var point2:Point = new Point();
    
}

Btw, what syntax do you want to use to specify that String parameter is enum?

0
Comment actions Permalink

Hi Konstantin, thanks for responding!

I'm looking similar feature like here, but in ActionScript :) http://blog.jetbrains.com/webide/2012/10/validating-javascript-code-with-jsdoc-types-annotations/

Regards,
Tanka

0

Please sign in to leave a comment.