You should add the type hint `ResolvedFormTypeInterface` to the `$type` argument.