Skip to content

Instantly share code, notes, and snippets.

@1504168
Last active June 2, 2022 03:37
Show Gist options
  • Save 1504168/fbeaa6aebf3d92660c2436a2348d0238 to your computer and use it in GitHub Desktop.
Save 1504168/fbeaa6aebf3d92660c2436a2348d0238 to your computer and use it in GitHub Desktop.
Properties(Getter and Setter creator from variable declaration line). Dependent on PROPERTYCODEGENERATOR
PROPERTIESCODEGENERATOR = LAMBDA(AllVariableDeclarationCode,[IsOnlyGetter],LET(
AllPropertyCode, MAP(AllVariableDeclarationCode,LAMBDA(CurrentVariableDeclaration,PROPERTYCODEGENERATOR(CurrentVariableDeclaration,IsOnlyGetter))),
Result,REDUCE("",AllPropertyCode,LAMBDA(FinalCode,CurrentPropertyCode,FinalCode & CHAR(10) & CHAR(10) & CurrentPropertyCode)),
Result
)
);
@1504168
Copy link
Author

1504168 commented May 31, 2022

@1504168
Copy link
Author

1504168 commented Jun 2, 2022

Updated to generate all the code in a single cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment