cast(_:)

Force-upcast the current syntax node to its base node type (TypeSyntax).

SyntaxBaseNodes.swift:1299

This declaration is deprecated: Use `TypeSyntax.init` for upcasting

func cast(_ syntaxType: TypeSyntax.Type) -> TypeSyntax

Returns

The base node created from the current syntax node, as the node can always be upcast to its base type.