Skip to content

Commit 37668f4

Browse files
authored
Merge pull request #56 from code0-tech/feat/#50
Variables with nested paths are not correctly displayed within the ReferenceBadge
2 parents ddd7bba + e973b87 commit 37668f4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/suggestion/getReferenceSuggestions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ const extractObjectProperties = (
6363
if (properties && properties.length > 0) {
6464
properties.forEach(property => {
6565
const propType = checker.getTypeOfSymbolAtLocation(property, property.valueDeclaration!);
66-
const propName = property.getName() as ReferencePath;
67-
const newPath = [...currentPath, propName];
66+
const propName = property.getName();
67+
const newPath = [...currentPath, {path: propName}];
6868

6969
// Recursively extract nested properties
7070
results.push(...extractObjectProperties(propType, checker, expectedType, newPath));

test/getReferenceSuggestions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {describe, expect, it} from 'vitest';
1+
import {describe, it} from 'vitest';
22
import {getReferenceSuggestions} from '../src/suggestion/getReferenceSuggestions';
33
import {Flow} from "@code0-tech/sagittarius-graphql-types";
44
import {DATA_TYPES, FUNCTION_SIGNATURES} from "./data";

0 commit comments

Comments
 (0)