Skip to content

Instantly share code, notes, and snippets.

@bettysteger
Created November 11, 2014 14:29
Show Gist options
  • Save bettysteger/976aca18390315f8c26f to your computer and use it in GitHub Desktop.
Save bettysteger/976aca18390315f8c26f to your computer and use it in GitHub Desktop.
Declarative Metadata (Angular 2.0 directive)
// AtScript
@Directive({
selector: '[blink]'
})
class Blink {
constructor(elment:Element, options:Options, timeout:Timeout) {}
}
// ES6
class Blink {
constructor(elment, options, timeout) {}
}
Blink.annotations = [new Directive({selector: '[blink]'})];
Blink.parameters = [Element, Options, Timeout];
// ES5
function Blink(elment, options, timeout) {}
Blink.annotations = [new Directive({selector: '[blink]'})];
Blink.parameters = [Element, Options, Timeout];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment