vscode/build/lib/mangle/renameWorker.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-11-15 06:29:18 +00:00
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
const ts = require("typescript");
const workerpool = require("workerpool");
const staticLanguageServiceHost_1 = require("./staticLanguageServiceHost");
let service;
function findRenameLocations(projectPath, fileName, position) {
if (!service) {
service = ts.createLanguageService(new staticLanguageServiceHost_1.StaticLanguageServiceHost(projectPath));
}
return service.findRenameLocations(fileName, position, false, false, {
providePrefixAndSuffixTextForRename: true,
}) ?? [];
}
workerpool.worker({
findRenameLocations
});
//# sourceMappingURL=renameWorker.js.map