Skip to content

Commit 436084b

Browse files
committed
Fixed typos
1 parent fef991b commit 436084b

File tree

1 file changed

+6
-6
lines changed
  • src/content/docs/pipelines/transformations

1 file changed

+6
-6
lines changed

src/content/docs/pipelines/transformations/worker.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type InputType = {
6363
}
6464

6565
// Define the expected type of records after they are transformed
66-
type OutputType = {;
66+
type OutputType = {
6767
foo: string
6868
modified: boolean
6969
pipelineId: string
@@ -76,9 +76,9 @@ export class MyTransform extends PipelineTransformationEntrypoint {
7676
metadata: PipelineBatchMetadata
7777
): Promise<OutputType[]> {
7878
try {
79-
console.log('Working on batch from pipeline: ',metadata.pipelineName)
79+
console.log('Working on batch from pipeline: ', metadata.pipelineName)
8080
return records.map((record) => {
81-
const mutated = record as OutputType;
81+
const mutated = record as OutputType
8282
mutated.modified = true
8383
mutated.pipelineId = metadata.pipelineId
8484
return mutated
@@ -92,9 +92,9 @@ export class MyTransform extends PipelineTransformationEntrypoint {
9292

9393
export default {
9494
async fetch(request, env, ctx): Promise<Response> {
95-
return new Response('Hello World!');
95+
return new Response('Hello World!')
9696
},
97-
} satisfies ExportedHandler<Env>;
97+
} satisfies ExportedHandler<Env>
9898
```
9999

100100
Transformations are defined by extending the `PipelineTransformationEntrypoint` class. The transformation definition must define a `run()` method, which contains the primary logic for the transformation. As seen above, the `run()` method receives objects from a Pipeline, and returns objects back to the Pipeline. The transformation above adds two fields to each incoming record.
@@ -226,4 +226,4 @@ export class MyTransform extends PipelineTransformationEntrypoint {
226226
```
227227

228228
## Error handling
229-
Coming soon!
229+
Coming soon!

0 commit comments

Comments
 (0)