-
Notifications
You must be signed in to change notification settings - Fork 21
ignore additionalProperties when are declared as function #119
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
ignore additionalProperties when are declared as function #119
Conversation
Signed-off-by: Antonio Mendoza Pérez <[email protected]>
…idation Signed-off-by: Antonio Mendoza Pérez <[email protected]>
Hi @JBBianchi , did you have the chance to look into this? I have been reading through rollup documentation and plugins and I didn't find any option to generate the methods as plain functions instead of functions expressions |
@antmendoza I had a look yesterday but couldn't investigate that much. I must admit I don't really see where the difference lies. Maybe in one case the function/method is in the object prototype (no problem) and in another case the function/method is in the object directly (error). One dirty workaround might be to delete normalize?(): Databasedswitch {
const clone = new Databasedswitch(this);
normalizeUsedForCompensationProperty(clone);
normalizeOnErrorsProperty(clone);
normalizeDataConditionsProperty(clone);
delete clone.normalize;
return clone;
} It also means It's just an idea, it's probably not the solution. |
thank you @JBBianchi , I have tested your solution and works fine, just it involves more changes:
if you think that this is a better solution I can change the code, no problem |
@antmendoza lgtm :) |
Does the PR actually fixes the problem? I read |
yes, those changes are not really needed. it can be reverted.
Yes as far as I now. I am using the sdk with this changes into other project and I am not facing the mentioned issue. Also I have run the index.html example (I have to create a test here) that was having the same problem, since is using the same bundle, and it is working ok now. |
Ok, sorry I misunderstood. Then all green for me :) |
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
When I was testing the sdk into other project I realice that the behaviour of the binary (./dist/umd/index.umd.js) was different than the actual source code. The
validate
function was throwing an error related to have found the "normalize" method as additional propertyI have changed the way we are deffinig "normalize" method to be able to reproduce the error in test.
Special notes for reviewers:
if you want to reproduce the error I've faced:
npm run build && cd dist && npm link
npm link @severlessworkflow/sdk-typescript
and create a workflow using builders,you will see an error like the following:
Additional information (if needed):