platform/packages/jael/jael_web/lib/src/jael_component.dart
Tobe O edfd785dfe Add 'packages/jael/' from commit 'af168281d94cda98a8fd333618696e92f4e035c5'
git-subtree-dir: packages/jael
git-subtree-mainline: 834de0300f
git-subtree-split: af168281d9
2020-02-15 18:22:11 -05:00

19 lines
555 B
Dart

/// A annotation for components that source-gen their `render()` methods.
class Jael {
/// The raw template.
final String template;
/// The path to a [template].
final String templateUrl;
/// Whether to parse the [template] as `DSX`.
final bool asDsx;
const Jael({this.template, this.templateUrl, this.asDsx});
}
/// Shorthand for enabling `DSX` syntax when using a [Jael] annotation.
class Dsx extends Jael {
const Dsx({String template, String templateUrl})
: super(template: template, templateUrl: templateUrl, asDsx: true);
}