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","file":"visitor.d.ts","sourcesContent":["/** Interface */\n\nimport ts from \"typescript\";\nimport { AllNodes } from \"./model\";\n\n/** Interface */\nexport interface VisitorEntities {\n\tnode: ts.Node;\n\tnodeType: ts.Type;\n\tparentDescriptor: AllNodes | undefined;\n\tsrcFile: ts.SourceFile;\n\tisInput: boolean | undefined;\n\t/** If this class is a helper class that contains resolves of an other class */\n\tisResolversImplementation: boolean | undefined;\n\t/** Name of the target entity if specified by it's parent */\n\tentityName: string | undefined,\n\t/** Property type in case of generic */\n\tpropertyType: ts.Type | undefined,\n\t/** Property symbol */\n\tsymbol: ts.Symbol | undefined\n}\n/**\n * Visitor\n */\nexport class NodeVisitor {\n\tprivate _queue: VisitorEntities[] = [];\n\t/** Get next element */\n\t*it() {\n\t\tvar i = 0;\n\t\tvar q = this._queue;\n\t\twhile (i < q.length) {\n\t\t\tyield q[i++];\n\t\t}\n\t}\n\n\t/** Push items */\n\tpush(\n\t\tnode: ts.Node,\n\t\tnodeType: ts.Type,\n\t\tparentDescriptor: AllNodes | undefined,\n\t\tsrcFile: ts.SourceFile,\n\t\tisInput?: boolean,\n\t\tentityName?: string,\n\t\tisResolversImplementation?: boolean,\n\t\t/** Type of property in case of generics */\n\t\tpropertyType?: ts.Type,\n\t\tsymbol?: ts.Symbol\n\t) {\n\t\tconst queue = this._queue;\n\t\tqueue.push({\n\t\t\tnode: node,\n\t\t\tnodeType: nodeType,\n\t\t\tparentDescriptor,\n\t\t\tsrcFile,\n\t\t\tisInput,\n\t\t\tentityName,\n\t\t\tisResolversImplementation,\n\t\t\tpropertyType,\n\t\t\tsymbol\n\t\t});\n\t\treturn this;\n\t}\n\tpushChildren(\n\t\ttypeChecker: ts.TypeChecker,\n\t\tnode: ts.Node,\n\t\tparentDescriptor: AllNodes | undefined,\n\t\tsrcFile: ts.SourceFile,\n\t\tisInput?: boolean,\n\t\tentityName?: string,\n\t\tisResolversImplementation?: boolean\n\t) {\n\t\tconst queue = this._queue;\n\t\tfor (let j = 0, children = node.getChildren(), jLen = children.length; j < jLen; ++j) {\n\t\t\tlet child = children[j];\n\t\t\tqueue.push({\n\t\t\t\tnode: child,\n\t\t\t\tnodeType: typeChecker.getTypeAtLocation(child),\n\t\t\t\tparentDescriptor,\n\t\t\t\tsrcFile,\n\t\t\t\tisInput,\n\t\t\t\tentityName,\n\t\t\t\tisResolversImplementation,\n\t\t\t\tpropertyType: undefined,\n\t\t\t\tsymbol: undefined\n\t\t\t});\n\t\t}\n\t}\n}"]}