Something like the following for wrap:
interface NamedSnippet {
type: "named";
name: string;
variableName: string;
}
interface CustomSnippet {
type: "custom";
body: string;
variableName?: string;
scopeType?: ScopeType;
}
type SnippetDescription = NamedSnippet | CustomSnippet;
async run(
[targets]: [Target[]],
snippet: SnippetDescription,
): Promise<ActionReturnValue> {}
insert should be similar but no variableName
Something like the following for wrap:
insert should be similar but no
variableName