mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 11:10:48 +00:00
22 lines
No EOL
1 KiB
JavaScript
22 lines
No EOL
1 KiB
JavaScript
"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
|