as(_:)

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

SyntaxBaseNodes.swift:1290

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

func `as`(_ 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.