add-export

Append an export statement to a specified file.

Example

{
  "op": "add-export",
  "targetSrc": "./src/index.ts",
  "content": "export { MyComponent } from './components/MyComponent';"
}

Fields

FieldsTypeDescription
op'add-export'Specifies the type of operation. For AddExportOperation, this field must be 'add-export'.
targetSrcstringThe path to the file where the export statement will be added.
contentstringThe export statement content to be added to the file.