Skip to content

Commit 280c886

Browse files
committed
types: add Output object type
1 parent d4564f4 commit 280c886

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.travis/build-types.ts

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface Tree {
3636
[k: string]: AnyType;
3737
}
3838

39-
type AnyType = PrimitiveType | ObjectType | ArrayType | SceneType | SceneItemType | SceneItemTransformType | OBSStatsType;
39+
type AnyType = PrimitiveType | ObjectType | OutputType | ArrayType | SceneType | SceneItemType | SceneItemTransformType | OBSStatsType;
4040

4141
interface PrimitiveType {
4242
type: 'string' | 'number' | 'boolean';
@@ -49,9 +49,15 @@ interface ObjectType {
4949
optional: boolean;
5050
}
5151

52+
interface OutputType {
53+
type: 'object';
54+
properties: Tree;
55+
optional: boolean;
56+
}
57+
5258
interface ArrayType {
5359
type: 'array';
54-
items: PrimitiveType | ObjectType | SceneType | SceneItemType | SceneItemTransformType;
60+
items: PrimitiveType | ObjectType | OutputType | SceneType | SceneItemType | SceneItemTransformType;
5561
optional: boolean;
5662
}
5763

@@ -376,6 +382,16 @@ function resolveType(inType: string): AnyType {
376382
},
377383
optional: isOptional
378384
};
385+
case 'array<output>':
386+
return {
387+
type: 'array',
388+
items: {
389+
type: 'object',
390+
properties: {},
391+
optional: true
392+
},
393+
optional: isOptional
394+
};
379395
case 'array<scene>':
380396
return {
381397
type: 'array',
@@ -419,6 +435,12 @@ function resolveType(inType: string): AnyType {
419435
properties: {},
420436
optional: isOptional
421437
};
438+
case 'output':
439+
return {
440+
type: 'object',
441+
properties: {},
442+
optional: isOptional
443+
};
422444
default:
423445
throw new Error(`Unknown type: ${inType}`);
424446
}

0 commit comments

Comments
 (0)