The term precompile is a little confusing, because it means different things. The standard Precompiling SomePkg... message by default means its caching the method definitions etc in your package. Optionally you can also save the type-inferred code, but that requires that you either (1) use the methods while the package is being built, or (2) explicitly call precompile while the package is being built.
To answer your direct question: the @require example, your methods will not even be cached, let alone in type-inferred form. In the second case, the method definition for f will be automatically cached. To cache the type-inferred form you’ll have to emit precompile directives.