ActionScript

JavaScript + Closure annotation

Notes

dynamic

dynamic

[leave out]

All JS 'classes' are dynamic by nature, so there's no need for this keyword?

final

final

[leave out]

Is this a runtime attribute, or is it handled at compile time? If the latter, we can just leave it out as attempts to subclass this type are handled (blocked) on the AS side anyway?

internal

internal

[leave out]

Same as with 'final'?

override

override function myFunction()


/**
 * @override
 */
function myFunction()

 

 

private

private

/**
 * @private
 */

 

 

protected

protected

/**
 * @protected
 */

 

 

public

public

[leave out]

All JS entities are public by nature, so there's no need for this keyword?

static

static

 

No annotation needed. Add property or method to the object itself, not it's prototype. 

MyClass.myProperty

instead of 

MyClass.prototype.myProperty
  • No labels