Skip to content

Commit

Permalink
Add support for anonymous return types
Browse files Browse the repository at this point in the history
Support return argument defined like this:

    { arg: 'info', type: { count: 'number' }}
  • Loading branch information
bajtos committed Oct 12, 2016
1 parent bfdeb6e commit 726d43d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/objc-codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ function convertToObjCReturnType(type, modelName, objcModelName) {
if (Array.isArray(type)) {
type = '<array>';
}
if (typeof type === 'object') {
// anonymous object type, e.g.
// { arg: 'info', type: { count: 'number' }}
// TODO(bajtos) convert this to a proper ObjC type
type = 'object';
}
return returnTypeConversionTable[type];
}

Expand Down

0 comments on commit 726d43d

Please sign in to comment.