@@ -10,7 +10,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
1010import { forEach } from 'vs/base/common/collections' ;
1111import { IExtensionPointUser , ExtensionMessageCollector , ExtensionsRegistry } from 'vs/workbench/services/extensions/common/extensionsRegistry' ;
1212import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
13- import { MenuId , MenuRegistry , ILocalizedString } from 'vs/platform/actions/common/actions' ;
13+ import { MenuId , MenuRegistry , ILocalizedString , IMenuItem } from 'vs/platform/actions/common/actions' ;
1414import { URI } from 'vs/base/common/uri' ;
1515
1616namespace schema {
@@ -199,7 +199,7 @@ namespace schema {
199199 return true ;
200200 }
201201
202- function isValidIcon ( icon : IUserFriendlyIcon , collector : ExtensionMessageCollector ) : boolean {
202+ function isValidIcon ( icon : IUserFriendlyIcon | undefined , collector : ExtensionMessageCollector ) : boolean {
203203 if ( typeof icon === 'undefined' ) {
204204 return true ;
205205 }
@@ -286,7 +286,7 @@ ExtensionsRegistry.registerExtensionPoint<schema.IUserFriendlyCommand | schema.I
286286
287287 const { icon, category, title, command } = userFriendlyCommand ;
288288
289- let absoluteIcon : { dark : URI ; light ?: URI ; } ;
289+ let absoluteIcon : { dark : URI ; light ?: URI ; } | undefined ;
290290 if ( icon ) {
291291 if ( typeof icon === 'string' ) {
292292 absoluteIcon = { dark : resources . joinPath ( extension . description . extensionLocation , icon ) } ;
@@ -346,8 +346,8 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyM
346346 collector . info ( localize ( 'dupe.command' , "Menu item references the same command as default and alt-command" ) ) ;
347347 }
348348
349- let group : string ;
350- let order : number ;
349+ let group : string | undefined ;
350+ let order : number | undefined ;
351351 if ( item . group ) {
352352 const idx = item . group . lastIndexOf ( '@' ) ;
353353 if ( idx > 0 ) {
@@ -364,7 +364,7 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyM
364364 group,
365365 order,
366366 when : ContextKeyExpr . deserialize ( item . when )
367- } ) ;
367+ } as IMenuItem ) ;
368368 }
369369 } ) ;
370370 }
0 commit comments