private resolveReferenceResult()

in server/src/jsonStore.ts [618:636]


	private resolveReferenceResult(locations: lsp.Location[], dedupLocations: Set<string>, monikers: Moniker[], referenceResult: ReferenceResult, context: lsp.ReferenceContext): void {
		const targets = this.item(referenceResult);
		if (targets === undefined) {
			return undefined;
		}
		for (let target of targets) {
			if (target.type === ItemEdgeProperties.declarations && context.includeDeclaration) {
				this.addLocation(locations, target.range, dedupLocations);
			} else if (target.type === ItemEdgeProperties.definitions && context.includeDeclaration) {
				this.addLocation(locations, target.range, dedupLocations);
			} else if (target.type === ItemEdgeProperties.references) {
				this.addLocation(locations, target.range, dedupLocations);
			} else if (target.type === ItemEdgeProperties.referenceResults) {
				this.resolveReferenceResult(locations, dedupLocations, monikers, target.result, context);
			} else if (target.type === ItemEdgeProperties.referenceLinks) {
				monikers.push(target.result);
			}
		}
	}