You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indicate that the type function is preferred (#695)
Prior to this commit, users coming to the type_of function would not realize that the type function in puppet does the same thing and is preferred over type_of.
After this commit, we have a comment indicating the above.
Copy file name to clipboardExpand all lines: README.markdown
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1190,6 +1190,8 @@ Returns a string description of the type when passed a value. Type can be a stri
1190
1190
1191
1191
#### `type_of`
1192
1192
1193
+
This function is provided for backwards compatibility but is generally not preferred over the built-in [type() function](https://docs.puppet.com/puppet/latest/reference/function.html#type) provided by Puppet.
1194
+
1193
1195
Returns the literal type when passed a value. Requires the new parser. Useful for comparison of types with `<=` such as in `if type_of($some_value) <= Array[String] { ... }` (which is equivalent to `if $some_value =~ Array[String] { ... }`) *Type*: rvalue.
0 commit comments