Skip to content

Support rich object as argument to snippet actions #1324

@pokey

Description

@pokey

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions