We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a9e623 commit 034b82bCopy full SHA for 034b82b
crates/wasmtime/src/runtime/component/types.rs
@@ -725,6 +725,18 @@ impl ComponentFunc {
725
.iter()
726
.map(|ty| Type::from(ty, &self.0.instance()))
727
}
728
+
729
+ #[doc(hidden)]
730
+ pub fn typecheck<Params, Return>(&self, cx: &InstanceType) -> anyhow::Result<()>
731
+ where
732
+ Params: crate::component::ComponentNamedList + crate::component::Lower,
733
+ Return: crate::component::ComponentNamedList + crate::component::Lift,
734
+ {
735
+ let ty = &self.0.types[self.0.index];
736
+ Params::typecheck(&InterfaceType::Tuple(ty.params), cx)?;
737
+ Return::typecheck(&InterfaceType::Tuple(ty.results), cx)?;
738
+ Ok(())
739
+ }
740
741
742
/// Core module type
0 commit comments