Skip to content

Commit 73fd9af

Browse files
committed
types renaming
Signed-off-by: Antonio Mendoza Pérez <[email protected]>
1 parent 5264020 commit 73fd9af

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

spec/model/action-builder.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*/
1717

18-
import {ActionBuilder, ActionDataFilterType, EventRefType} from '../../src';
18+
import {ActionBuilder, ActionDataFilterType, EventRef} from '../../src';
1919
import {ActionDataFilterBuilder} from '../../src/model/action-data-filter.builder';
2020

2121

@@ -67,6 +67,6 @@ function validActionDataFilter(): ActionDataFilterType {
6767
return {};
6868
}
6969

70-
function validEventRef(): EventRefType {
70+
function validEventRef(): EventRef {
7171
return {resultEventRef: "result"};
7272
}

src/model/action.builder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
import {ActionDataFilterType, Action, EventRefType, FunctionRef} from "./types";
17+
import {ActionDataFilterType, Action, EventRef, FunctionRef} from "./types";
1818

1919
export class ActionBuilder {
2020

@@ -26,7 +26,7 @@ export class ActionBuilder {
2626
return this;
2727
}
2828

29-
withEventRef(value: EventRefType): ActionBuilder {
29+
withEventRef(value: EventRef): ActionBuilder {
3030
this.model.eventRef = value;
3131
return this;
3232
}

src/model/event-ref.builder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
* limitations under the License.
1515
*
1616
*/
17-
import {EventRefType} from '../index';
17+
import {EventRef} from '../index';
1818

1919
export class EventRefBuilder {
2020

21-
private readonly model: EventRefType = {};
21+
private readonly model: EventRef = {};
2222

2323

2424
withResultEventRef(value: string): EventRefBuilder {
@@ -42,7 +42,7 @@ export class EventRefBuilder {
4242
return this;
4343
}
4444

45-
build(): EventRefType {
45+
build(): EventRef {
4646

4747
if (!this.model.resultEventRef) {
4848
throw new Error("Field resultEventRef can not be undefined");

src/model/types.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import {
3333
export type Arguments = object;
3434

3535
export type FunctionName = string;
36-
export type FunctionRefImplType = {
36+
export type FunctionRef = | FunctionName
37+
| {
3738
/**
3839
* Name of the referenced function
3940
*/
@@ -43,10 +44,8 @@ export type FunctionRefImplType = {
4344
*/
4445
arguments?: Arguments;
4546
};
46-
export type FunctionRef = | FunctionName
47-
| FunctionRefImplType;
4847

49-
export type EventRefType = {
48+
export type EventRef = {
5049
/**
5150
* Reference to the unique name of a 'produced' event definition
5251
*/
@@ -92,7 +91,7 @@ export type Action = {
9291
/**
9392
* References a 'trigger' and 'result' reusable event definitions
9493
*/
95-
eventRef?: EventRefType;
94+
eventRef?: EventRef;
9695
/**
9796
* Time period to wait for function execution to complete
9897
*/

0 commit comments

Comments
 (0)