Skip to content

Commit

Permalink
Merge pull request #34 from greeflas/bugfix/issue_21
Browse files Browse the repository at this point in the history
Fix #21: Add support of i16 data type
  • Loading branch information
Luchanso committed Mar 1, 2021
2 parents 9615506 + aac4769 commit 2d2644c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/thrift/thriftrw.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ declare module 'thriftrw' {

export interface BaseType {
type: 'BaseType';
baseType: 'string' | 'i32' | 'i64' | 'double' | 'float' | 'bool' | 'void' | 'binary';
baseType: 'string' | 'i16' | 'i32' | 'i64' | 'double' | 'float' | 'bool' | 'void' | 'binary';
annotations?: TypeAnnotation[] | {};
}

Expand Down
1 change: 1 addition & 0 deletions src/renderer/utils/defaultRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function getDefaultValue(fieldAst: FieldAst, thriftDefinitions: Record<string, P
switch (fieldAst.valueType.baseType) {
case 'string':
return '';
case 'i16':
case 'i32':
case 'i64':
case 'double':
Expand Down
1 change: 1 addition & 0 deletions src/renderer/utils/getMethodJsonSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function getFieldSchema(fieldAst: FieldAst, thriftDefinitions: Record<string, Pr
switch (fieldAst.valueType.baseType) {
case 'string':
return { type: 'string' };
case 'i16':
case 'i32':
case 'i64':
case 'double':
Expand Down

0 comments on commit 2d2644c

Please sign in to comment.