mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 06:41:14 +00:00
Fix TS warnings
vscode is strict about style
This commit is contained in:
parent
eec918e95a
commit
12a098856e
1 changed files with 14 additions and 10 deletions
|
@ -23,27 +23,31 @@ import {
|
||||||
let client: LanguageClient;
|
let client: LanguageClient;
|
||||||
|
|
||||||
function lspProgramNameSuffix(): string | null {
|
function lspProgramNameSuffix(): string | null {
|
||||||
if (process.platform == "darwin")
|
if (process.platform === "darwin") {
|
||||||
return "x86_64-apple-darwin";
|
return "x86_64-apple-darwin";
|
||||||
if (process.platform === "linux") {
|
|
||||||
if (process.arch === "x64")
|
|
||||||
return "x86_64-unknown-linux-gnu"
|
|
||||||
}
|
}
|
||||||
if (process.platform == "win32")
|
if (process.platform === "linux") {
|
||||||
|
if (process.arch === "x64") {
|
||||||
|
return "x86_64-unknown-linux-gnu";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (process.platform === "win32") {
|
||||||
return "x86_64-pc-windows-gnu.exe";
|
return "x86_64-pc-windows-gnu.exe";
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function activate(context: ExtensionContext) {
|
export function activate(context: ExtensionContext) {
|
||||||
let lsp_suffix = lspProgramNameSuffix();
|
let lspSuffix = lspProgramNameSuffix();
|
||||||
if (lsp_suffix == null)
|
if (lspSuffix === null) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let serverModule = path.join(context.extensionPath, "bin", "sixtyfps-lsp-" + lsp_suffix);
|
let serverModule = path.join(context.extensionPath, "bin", "sixtyfps-lsp-" + lspSuffix);
|
||||||
|
|
||||||
if (!existsSync(serverModule))
|
if (!existsSync(serverModule)) {
|
||||||
serverModule = context.asAbsolutePath(path.join('..', 'target', 'debug', 'sixtyfps-lsp'));
|
serverModule = context.asAbsolutePath(path.join('..', 'target', 'debug', 'sixtyfps-lsp'));
|
||||||
|
}
|
||||||
if (!existsSync(serverModule)) {
|
if (!existsSync(serverModule)) {
|
||||||
console.warn("Could not locate sixtyfps-server server binary, neither in bundled bin/ directory nor relative in ../target");
|
console.warn("Could not locate sixtyfps-server server binary, neither in bundled bin/ directory nor relative in ../target");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue