Skip to content

Commit

Permalink
chore: return Gio.FIle from copy
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Jul 3, 2024
1 parent ac6078e commit 81a94e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/langs/typescript/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const typescript_template_dir = Gio.File.new_for_path(
).resolve_relative_path("langs/typescript/template");

export async function setupTypeScriptProject(destination, document) {
const destination_uri = await copy(
const destination_file = await copy(
"tsconfig.json",
typescript_template_dir,
destination,
Expand All @@ -51,6 +51,6 @@ export async function setupTypeScriptProject(destination, document) {
// Notify the language server that the tsconfig file was created
// to initialized diagnostics and type checkings
document.lspc._notify("workspace/didCreateFile", {
files: [{ uri: destination_uri }],
files: [{ uri: destination_file.get_uri() }],
});
}
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,5 @@ export async function copy(filename, source_dir, dest_dir, flags) {
}
}

return dest_file.get_uri();
return dest_file;
}

0 comments on commit 81a94e3

Please sign in to comment.