提交 9faa15ed 编写于 作者: J Johannes Rieken

fix strict null errors

上级 97ed8aba
......@@ -491,7 +491,7 @@ CommandsRegistry.registerCommand('editor.action.formatInspect', accessor => {
const editor = accessor.get(ICodeEditorService).getActiveCodeEditor();
if (!editor || !editor.hasModel()) {
return undefined;
return;
}
console.log(`Available Formatters for: ${editor.getModel().uri.toString(true)}`);
// range formatters
......
......@@ -23,5 +23,5 @@ export interface IOpenerService {
export const NullOpenerService: IOpenerService = Object.freeze({
_serviceBrand: undefined,
open() { return Promise.resolve(undefined); }
open() { return Promise.resolve(false); }
});
......@@ -187,7 +187,7 @@ async function createLanguageSnippetFile(pick: ISnippetPick, fileService: IFileS
await fileService.updateContent(URI.file(pick.filepath), contents);
}
CommandsRegistry.registerCommand(id, async accessor => {
CommandsRegistry.registerCommand(id, async (accessor): Promise<any> => {
const snippetService = accessor.get(ISnippetsService);
const quickInputService = accessor.get(IQuickInputService);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册