feat(build): emit checked param tokens
Generate ParamName constants for handle data parameters so public code can refer to checked param metadata instead of stringly typed names. req: codegen/003
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use slhx_core::{
|
||||
event, navigate, redirect, replace, Atom, AtomSnapshot, AtomState, BuildFingerprint,
|
||||
ComponentRef, CssClass, CssClasses, Effect, EffectBatch, Form, Handle, IntoEffect, KeyedSlot,
|
||||
NavigateMode, Payload, ResourceKind, SafeHtml, ScopeKey, Slot,
|
||||
NavigateMode, ParamName, Payload, ResourceKind, SafeHtml, ScopeKey, Slot,
|
||||
};
|
||||
|
||||
#[test]
|
||||
@@ -93,6 +93,14 @@ fn slot_html_requires_explicit_safe_html() {
|
||||
assert_eq!(payload, Payload::Html(String::from("<strong>ok</strong>")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn param_names_format_generated_param_names() {
|
||||
// req: codegen/003
|
||||
let param = ParamName::new("todo_id");
|
||||
assert_eq!(param.as_str(), "todo_id");
|
||||
assert_eq!(param.to_string(), "todo_id");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn component_refs_format_generated_component_names() {
|
||||
// req: component/003
|
||||
|
||||
Reference in New Issue
Block a user