Cloud API Overview > @adpt/cloud > isNetworkServiceElement
isNetworkServiceElement() function
Type assertion that tests an element to see if it is a NetworkService
Signature:
export declare function isNetworkServiceElement(el: AdaptElement): el is AdaptElement<NetworkServiceProps>;
Parameters
Parameter | Type | Description |
---|---|---|
el | AdaptElement | the element to be tested |
Returns:
el is AdaptElement<
NetworkServiceProps
>
true
if el
is a NetworkService, false
otherwise
Remarks
Also functions as a type assertion for Typescript, so the arguments type will be adjusted to reflect that it is an AdaptElement<NetworkServiceProps>
instead of a generic AdaptElement
.