提交 5412e858 编写于 作者: M Matt Bierner

Fix more implict any errors

上级 d1e87a2d
......@@ -5,5 +5,5 @@
declare module 'sudo-prompt' {
export function exec(cmd: string, options: { name?: string, icns?: string }, callback: (error: string, stdout: string, stderr: string) => void);
export function exec(cmd: string, options: { name?: string, icns?: string }, callback: (error: string, stdout: string, stderr: string) => void): void;
}
\ No newline at end of file
......@@ -8,8 +8,8 @@ declare module 'yazl' {
class ZipFile {
outputStream: stream.Stream;
addBuffer(buffer: Buffer, path: string);
addFile(localPath: string, path: string);
end();
addBuffer(buffer: Buffer, path: string): void;
addFile(localPath: string, path: string): void;
end(): void;
}
}
\ No newline at end of file
......@@ -163,7 +163,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
const lineContent = model.getLineContent(lineNumber);
const indent = TextModel.computeIndentLevel(lineContent, tabSize);
const lineHasSpace = config.fontInfo.spaceWidth * indent > 22;
const isFolded = (lineNumber) => {
const isFolded = (lineNumber: number) => {
return lineNumber > 2 && this._editor.getTopForLineNumber(lineNumber) === this._editor.getTopForLineNumber(lineNumber - 1);
};
......
......@@ -391,7 +391,7 @@ function collectWorkspaceStats(folder: string, filter: string[]): Promise<Worksp
const MAX_FILES = 20000;
function walk(dir: string, filter: string[], token, done: (allFiles: string[]) => void): void {
function walk(dir: string, filter: string[], token: { count: any; maxReached: any; }, done: (allFiles: string[]) => void): void {
let results: string[] = [];
readdir(dir, async (err, files) => {
// Ignore folders that can't be read
......
......@@ -167,7 +167,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
private collectFiles(extension: ILocalExtension): Promise<IFile[]> {
const collectFilesFromDirectory = async (dir): Promise<string[]> => {
const collectFilesFromDirectory = async (dir: string): Promise<string[]> => {
let entries = await pfs.readdir(dir);
entries = entries.map(e => path.join(dir, e));
const stats = await Promise.all(entries.map(e => pfs.stat(e)));
......@@ -269,7 +269,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
this.reportTelemetry(this.getTelemetryEvent(operation), getGalleryExtensionTelemetryData(extension), new Date().getTime() - startTime, undefined);
};
const onDidInstallExtensionFailure = (extension: IGalleryExtension, operation: InstallOperation, error) => {
const onDidInstallExtensionFailure = (extension: IGalleryExtension, operation: InstallOperation, error: Error) => {
const errorCode = error && (<ExtensionManagementError>error).code ? (<ExtensionManagementError>error).code : ERROR_UNKNOWN;
this.logService.error(`Failed to install extension:`, extension.identifier.id, error ? error.message : errorCode);
this._onDidInstallExtension.fire({ identifier: extension.identifier, gallery: extension, operation, error: errorCode });
......
......@@ -56,7 +56,7 @@ export class LifecycleService extends AbstractLifecycleService {
const windowId = this.windowService.getCurrentWindowId();
// Main side indicates that window is about to unload, check for vetos
ipc.on('vscode:onBeforeUnload', (event, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => {
ipc.on('vscode:onBeforeUnload', (_event: unknown, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => {
this.logService.trace(`lifecycle: onBeforeUnload (reason: ${reply.reason})`);
// trigger onBeforeShutdown events and veto collecting
......@@ -75,7 +75,7 @@ export class LifecycleService extends AbstractLifecycleService {
});
// Main side indicates that we will indeed shutdown
ipc.on('vscode:onWillUnload', (event, reply: { replyChannel: string, reason: ShutdownReason }) => {
ipc.on('vscode:onWillUnload', (_event: unknown, reply: { replyChannel: string, reason: ShutdownReason }) => {
this.logService.trace(`lifecycle: onWillUnload (reason: ${reply.reason})`);
// trigger onWillShutdown events and joining
......
......@@ -276,7 +276,7 @@ export class LifecycleService extends Disposable implements ILifecycleService {
});
// Window After Closing
window.win.on('closed', e => {
window.win.on('closed', () => {
this.logService.trace(`Lifecycle#window.on('closed') - window ID ${window.id}`);
// update window count
......
......@@ -44,7 +44,7 @@ export class MainThreadSearch implements MainThreadSearchShape {
this._searchProvider.delete(handle);
}
$handleFileMatch(handle: number, session, data: UriComponents[]): void {
$handleFileMatch(handle: number, session: number, data: UriComponents[]): void {
const provider = this._searchProvider.get(handle);
if (!provider) {
throw new Error('Got result for unknown provider');
......@@ -53,7 +53,7 @@ export class MainThreadSearch implements MainThreadSearchShape {
provider.handleFindMatch(session, data);
}
$handleTextMatch(handle: number, session, data: IRawFileMatch2[]): void {
$handleTextMatch(handle: number, session: number, data: IRawFileMatch2[]): void {
const provider = this._searchProvider.get(handle);
if (!provider) {
throw new Error('Got result for unknown provider');
......
......@@ -82,7 +82,7 @@ export class Workbench extends Layout {
// Inform user about loading issues from the loader
(<any>window).require.config({
onError: err => {
onError: (err: { errorCode: string; }) => {
if (err.errorCode === 'load') {
onUnexpectedError(new Error(localize('loaderErrorNative', "Failed to load a required file. Please restart the application to try again. Details: {0}", JSON.stringify(err))));
}
......
......@@ -1685,7 +1685,7 @@ export interface IProblemMatcherRegistry {
onReady(): Promise<void>;
get(name: string): NamedProblemMatcher;
keys(): string[];
readonly onMatcherChanged;
readonly onMatcherChanged: Event<void>;
}
class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry {
......
......@@ -31,7 +31,7 @@ export class BroadcastService extends Disposable implements IBroadcastService {
}
private registerListeners(): void {
ipc.on('vscode:broadcast', (event, b: IBroadcast) => {
ipc.on('vscode:broadcast', (event: unknown, b: IBroadcast) => {
this.logService.trace(`Received broadcast from main in window ${this.windowId}: `, b);
this._onBroadcast.fire(b);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册