Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getTypeInfo should normalize slashes in path before querying our internal APIs for type info #1762

Merged
merged 2 commits into from
May 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix bug
  • Loading branch information
cspotcode committed May 20, 2022
commit c8241b6e5cf7799e7640fb1f65932ea39debcfd3
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,10 @@ export function createFromPreloadedConfig(
const normalizedFileName = normalizeSlashes(fileName);
updateMemoryCache(code, normalizedFileName);

const info = service.getQuickInfoAtPosition(normalizedFileName, position);
const info = service.getQuickInfoAtPosition(
normalizedFileName,
position
);
const name = ts.displayPartsToString(info ? info.displayParts : []);
const comment = ts.displayPartsToString(info ? info.documentation : []);

Expand Down