bazel-skylib/docs/types_doc.md

262 lines
4.3 KiB
Markdown
Raw Permalink Normal View History

## types.is_list
<pre>
types.is_list(<a href="#types.is_list-v">v</a>)
</pre>
Returns True if v is an instance of a list.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_list-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_string
<pre>
types.is_string(<a href="#types.is_string-v">v</a>)
</pre>
Returns True if v is an instance of a string.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_string-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_bool
<pre>
types.is_bool(<a href="#types.is_bool-v">v</a>)
</pre>
Returns True if v is an instance of a bool.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_bool-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_none
<pre>
types.is_none(<a href="#types.is_none-v">v</a>)
</pre>
Returns True if v has the type of None.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_none-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_int
<pre>
types.is_int(<a href="#types.is_int-v">v</a>)
</pre>
Returns True if v is an instance of a signed integer.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_int-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_tuple
<pre>
types.is_tuple(<a href="#types.is_tuple-v">v</a>)
</pre>
Returns True if v is an instance of a tuple.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_tuple-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_dict
<pre>
types.is_dict(<a href="#types.is_dict-v">v</a>)
</pre>
Returns True if v is an instance of a dict.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_dict-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_function
<pre>
types.is_function(<a href="#types.is_function-v">v</a>)
</pre>
Returns True if v is an instance of a function.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_function-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>
## types.is_depset
<pre>
types.is_depset(<a href="#types.is_depset-v">v</a>)
</pre>
Returns True if v is an instance of a `depset`.
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="types.is_depset-v">
<td><code>v</code></td>
<td>
required.
<p>
The value whose type should be checked.
</p>
</td>
</tr>
</tbody>
</table>