Prefer import type
when importing types
This commit is contained in:
@@ -11,17 +11,20 @@ import { join, normalize } from 'path';
|
||||
import { tmpdir } from 'os';
|
||||
import { throttle } from 'lodash';
|
||||
|
||||
import { createParser, ParserConfiguration } from 'dashdash';
|
||||
import type { ParserConfiguration } from 'dashdash';
|
||||
import { createParser } from 'dashdash';
|
||||
import ProxyAgent from 'proxy-agent';
|
||||
import { FAILSAFE_SCHEMA, safeLoad } from 'js-yaml';
|
||||
import { gt } from 'semver';
|
||||
import config from 'config';
|
||||
import got, { StrictOptions as GotOptions } from 'got';
|
||||
import type { StrictOptions as GotOptions } from 'got';
|
||||
import got from 'got';
|
||||
import { v4 as getGuid } from 'uuid';
|
||||
import pify from 'pify';
|
||||
import mkdirp from 'mkdirp';
|
||||
import rimraf from 'rimraf';
|
||||
import { app, BrowserWindow, ipcMain } from 'electron';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
import { app, ipcMain } from 'electron';
|
||||
|
||||
import { getTempPath } from '../../app/attachments';
|
||||
import { DialogType } from '../types/Dialogs';
|
||||
@@ -32,7 +35,7 @@ import * as packageJson from '../../package.json';
|
||||
import { getSignatureFileName } from './signature';
|
||||
import { isPathInside } from '../util/isPathInside';
|
||||
|
||||
import { LoggerType } from '../types/Logging';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
|
||||
const writeFile = pify(writeFileCallback);
|
||||
const mkdirpPromise = pify(mkdirp);
|
||||
|
@@ -2,12 +2,12 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import config from 'config';
|
||||
import { BrowserWindow } from 'electron';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
|
||||
import { UpdaterInterface } from './common';
|
||||
import type { UpdaterInterface } from './common';
|
||||
import { start as startMacOS } from './macos';
|
||||
import { start as startWindows } from './windows';
|
||||
import { LoggerType } from '../types/Logging';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
|
||||
let initialized = false;
|
||||
|
||||
|
@@ -2,16 +2,19 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { createReadStream, statSync } from 'fs';
|
||||
import { createServer, IncomingMessage, Server, ServerResponse } from 'http';
|
||||
import { AddressInfo } from 'net';
|
||||
import type { IncomingMessage, Server, ServerResponse } from 'http';
|
||||
import { createServer } from 'http';
|
||||
import type { AddressInfo } from 'net';
|
||||
import { dirname } from 'path';
|
||||
|
||||
import { v4 as getGuid } from 'uuid';
|
||||
import { app, autoUpdater, BrowserWindow } from 'electron';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
import { app, autoUpdater } from 'electron';
|
||||
import config from 'config';
|
||||
import { gt } from 'semver';
|
||||
import got from 'got';
|
||||
|
||||
import type { UpdaterInterface } from './common';
|
||||
import {
|
||||
checkForUpdates,
|
||||
deleteTempDir,
|
||||
@@ -19,10 +22,9 @@ import {
|
||||
getAutoDownloadUpdateSetting,
|
||||
getPrintableError,
|
||||
setUpdateListener,
|
||||
UpdaterInterface,
|
||||
} from './common';
|
||||
import * as durations from '../util/durations';
|
||||
import { LoggerType } from '../types/Logging';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import { hexToBinary, verifySignature } from './signature';
|
||||
import { markShouldQuit } from '../../app/window_state';
|
||||
import { DialogType } from '../types/Dialogs';
|
||||
|
@@ -2,14 +2,17 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { dirname, join } from 'path';
|
||||
import { spawn as spawnEmitter, SpawnOptions } from 'child_process';
|
||||
import type { SpawnOptions } from 'child_process';
|
||||
import { spawn as spawnEmitter } from 'child_process';
|
||||
import { readdir as readdirCallback, unlink as unlinkCallback } from 'fs';
|
||||
|
||||
import { app, BrowserWindow } from 'electron';
|
||||
import type { BrowserWindow } from 'electron';
|
||||
import { app } from 'electron';
|
||||
import config from 'config';
|
||||
import { gt } from 'semver';
|
||||
import pify from 'pify';
|
||||
|
||||
import type { UpdaterInterface } from './common';
|
||||
import {
|
||||
checkForUpdates,
|
||||
deleteTempDir,
|
||||
@@ -17,10 +20,9 @@ import {
|
||||
getAutoDownloadUpdateSetting,
|
||||
getPrintableError,
|
||||
setUpdateListener,
|
||||
UpdaterInterface,
|
||||
} from './common';
|
||||
import * as durations from '../util/durations';
|
||||
import { LoggerType } from '../types/Logging';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import { hexToBinary, verifySignature } from './signature';
|
||||
import { markShouldQuit } from '../../app/window_state';
|
||||
import { DialogType } from '../types/Dialogs';
|
||||
|
Reference in New Issue
Block a user