@@ -28,6 +29,7 @@ export class ApiCommandArgument<V, O = V> {
staticreadonlyUri=newApiCommandArgument<URI>('uri','Uri of a text document',v=>URI.isUri(v),v=>v);
staticreadonlyPosition=newApiCommandArgument<types.Position,IPosition>('position','A position in a text document',v=>types.Position.isPosition(v),typeConverters.Position.from);
staticreadonlyRange=newApiCommandArgument<types.Range,IRange>('range','A range in a text document',v=>types.Range.isRange(v),typeConverters.Range.from);
staticreadonlySelection=newApiCommandArgument<types.Selection,ISelection>('selection','A selection in a text document',v=>types.Selection.isSelection(v),typeConverters.Selection.from);
newApiCommandArgument('rangeOrSelection','Range in a text document. Some refactoring provider requires Selection object.',v=>types.Range.isRange(v),v=>types.Selection.isSelection(v)?typeConverters.Selection.from(v):typeConverters.Range.from(v)),
newApiCommandArgument('kind','(optional) Code action kind to return code actions for',v=>typeofv==='string'||typeofv==='undefined',v=>v),
newApiCommandArgument('itemResolveCount','(optional) Number of code actions to resolve (too large numbers slow down code actions)',v=>typeofv==='number'||typeofv==='undefined',v=>v)
],
newApiCommandResult<CustomCodeAction[],(vscode.CodeAction|vscode.Command|undefined)[]|undefined>('A promise that resolves to an array of Command-instances.',(value,_args,converter)=>{
{name:'uri',description:'Uri of a text document',constraint:URI},
{name:'rangeOrSelection',description:'Range in a text document. Some refactoring provider requires Selection object.',constraint:types.Range},
{name:'kind',description:'(optional) Code action kind to return code actions for',constraint:(value:any)=>!value||typeofvalue.value==='string'},
{name:'itemResolveCount',description:'(optional) Number of code actions to resolve (too large numbers slow down code actions)',constraint:(value:any)=>value===undefined||typeofvalue==='number'}
],
returns:'A promise that resolves to an array of Command-instances.'