Skip to content
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

PropertyDeclaration Lamda Body formatting #38

Closed
belav opened this issue Mar 15, 2021 · 3 comments
Closed

PropertyDeclaration Lamda Body formatting #38

belav opened this issue Mar 15, 2021 · 3 comments
Labels

Comments

@belav
Copy link
Owner

belav commented Mar 15, 2021

This may have less to do with the property, and more to do with the syntax inside of the lamda body

public Language CurrentLanguage =>
    this.currentLanguage ?? (this.currentLanguage = this.UnitOfWork.GetRepository<Language>()
        .Get(SiteContext.Current.LanguageDto.Id));

Should be something more like

public Language CurrentLanguage =>
    this.currentLanguage ?? 
        (this.currentLanguage = this.UnitOfWork.GetRepository<Language>().Get(
            SiteContext.Current.LanguageDto.Id
        ));
@belav belav added type:bug Something isn't working area:formatting labels Mar 15, 2021
@belav belav added this to the Beta milestone Mar 15, 2021
@belav
Copy link
Owner Author

belav commented Mar 28, 2021

This may be related to #7
Prettier typescript formatting - so looking at how they do it could help

this.currentLanguage = () => {
  this.currentLanguage ??
    (this.currentLanguage = this.UnitOfWork.GetRepository<Language>().Get(
      SiteContext.Current.LanguageDto.Id
    ));
};

@belav belav modified the milestones: Beta, 0.9.2 May 6, 2021
@belav belav modified the milestones: 0.9.3, 0.9.4 May 16, 2021
@belav belav modified the milestones: 0.9.4, 0.9.5 May 24, 2021
@belav belav modified the milestones: 0.9.5, 0.9.6 May 31, 2021
@belav belav modified the milestones: 0.9.6, 0.9.7 Jun 12, 2021
@belav
Copy link
Owner Author

belav commented Jun 20, 2021

The ?? is a BinaryExpression, so #37 is also related to this

@belav belav removed this from the 0.9.7 milestone Jun 20, 2021
@belav
Copy link
Owner Author

belav commented Oct 19, 2021

This was resolved with #7

@belav belav closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant