Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 901 Bytes

types.basetypeimpl.accept.md

File metadata and controls

27 lines (16 loc) · 901 Bytes

Home > @skunkteam/types > BaseTypeImpl > accept

BaseTypeImpl.accept() method

Accept a visitor (visitor pattern).

Signature:

abstract accept<R>(visitor: Visitor<R>): R;

Parameters

Parameter Type Description
visitor Visitor<R> the visitor to accept

Returns:

R

Remarks

Note that, while it can be used to traverse a tree, this is not part of this pattern. The visitor that visits a particular type can decide to visit children of that type (or not). See ./testutils.ts for an example.