2019-03-23 18:49:37 +00:00
|
|
|
/// A annotation for components that source-gen their `render()` methods.
|
|
|
|
class Jael {
|
|
|
|
/// The raw template.
|
2021-06-20 12:37:20 +00:00
|
|
|
final String? template;
|
2019-03-23 18:49:37 +00:00
|
|
|
|
|
|
|
/// The path to a [template].
|
2021-06-20 12:37:20 +00:00
|
|
|
final String? templateUrl;
|
2019-03-23 18:49:37 +00:00
|
|
|
|
|
|
|
/// Whether to parse the [template] as `DSX`.
|
2021-06-20 12:37:20 +00:00
|
|
|
final bool? asDsx;
|
2019-03-23 18:49:37 +00:00
|
|
|
|
|
|
|
const Jael({this.template, this.templateUrl, this.asDsx});
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Shorthand for enabling `DSX` syntax when using a [Jael] annotation.
|
|
|
|
class Dsx extends Jael {
|
2021-06-20 12:37:20 +00:00
|
|
|
const Dsx({String? template, String? templateUrl})
|
2019-03-23 18:49:37 +00:00
|
|
|
: super(template: template, templateUrl: templateUrl, asDsx: true);
|
|
|
|
}
|