-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(functional): make the functional api client a pure function. #103
Conversation
}), | ||
function: Utils.generateTemplateExpression(factory, urlTemplate), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't understand the reason but this code isn't worked.
The class
part works fine but function
part will be wrong template string.
name: "RequestOption", | ||
}), | ||
); | ||
typeParameters.push(...methodTypeParameters(factory, params)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each functions are now accept the apiClient
argument and RequestOption
type argument.
], | ||
}), | ||
}), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the apiClient
argument was added here.
declarations: [ | ||
factory.VariableDeclaration.create({ | ||
name: params.convertedParams.functionName, | ||
initializer: ArrowFunction.create(factory, params, option), | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the functional api client will be list of ArrowFunctions
now.
Fixed by #109. Closing. |
Summary
Currently, the functional api client does not support tree-shaking.
This PR solves the problem.
Fixes #97
Test Plan
I'll update the snapshot testing.
Example output
I don't know why but the
url
variable is corrupted now...