UNPKG

1.05 kBJavaScriptView Raw
1"use strict";
2// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3// See LICENSE in the project root for license information.
4Object.defineProperty(exports, "__esModule", { value: true });
5exports.VisitorState = void 0;
6/**
7 * Keeps track of a directed graph traversal that needs to detect cycles.
8 */
9var VisitorState;
10(function (VisitorState) {
11 /**
12 * We have not visited the node yet.
13 */
14 VisitorState[VisitorState["Unvisited"] = 0] = "Unvisited";
15 /**
16 * We have visited the node, but have not finished traversing its references yet.
17 * If we reach a node that is already in the `Visiting` state, this means we have
18 * encountered a cyclic reference.
19 */
20 VisitorState[VisitorState["Visiting"] = 1] = "Visiting";
21 /**
22 * We are finished vising the node and all its references.
23 */
24 VisitorState[VisitorState["Visited"] = 2] = "Visited";
25})(VisitorState = exports.VisitorState || (exports.VisitorState = {}));
26//# sourceMappingURL=VisitorState.js.map
\No newline at end of file