In Bases, applying link() to a string containing a URL returns a URL data type rather than the usual Link type. However, this behavior is not documented at Functions - Obsidian Help , which instead implies that link() always returns a Link type.
Additionally, Bases syntax - Obsidian Help has a list of data types, but the URL type is not listed among them. The only hint of the URL type I could find in the Bases Help documentation is that it shows up as an acceptable input type to the functions file() and image().
I only noticed this because I was using a formula like link(x).asFile() and had to track type errors that were popping up due to asFile() not being defined for the URL type. It would be helpful if the Help documentation more explicitly made note of the URL type and its relationship to the link() function and any other relevant info about it.
I’m glad you brought this up. I’ve come across other undocumented types, or if mentioned then hard to find references to. Even just a list of all the types would be helpful.
Still, I think your topic here is good for drawing conversation and ideas about it.
For a slightly related gripe: I had hoped Obsidian would make a type function that returned a string of the type. But at least they gave us the boolean.
Agreed that a full list of all Bases data types at Bases syntax - Obsidian Help would be very much welcome, assuming there are other types besides the ones listed and the unlisted URL type (as you seem to imply). And also agreed that something like a type() function returning a variable’s type as a string would be a very helpful addition.