Skip to content

Commit

Permalink
Merge pull request #2 from pabloem/core-api
Browse files Browse the repository at this point in the history
sketching the core API for JS SDK
  • Loading branch information
robertwb authored Jan 4, 2022
2 parents 7a82478 + 1c9aeff commit 4d16093
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions sdks/node-ts/src/apache_beam/core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class PValue {
constructor() {
}

apply(transform: PTransform): PValue {
return transform.expand(this);
}

map(callable): PValue {
return this.apply(new ParDo(callable));
}

}

class Pipeline extends PValue {

}

class PCollection extends PValue {

}

class PTransform {
expand(input: PValue): PValue {
throw new Error('Method expand has not been implemented.');
}
}

class ParDo extends PTransform {
private doFn;
constructor(callableOrDoFn) {
super()
this.doFn = callableOrDoFn;
}
}

class DoFn {

}

0 comments on commit 4d16093

Please sign in to comment.