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

fix(flex-offset): correct return type when using with 'strictNullChecks' #929

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

Teamop
Copy link
Contributor

@Teamop Teamop commented Dec 17, 2018

Currently, when using @angular/flex-layout@latest(7.0.0-beta.21) with "strictNullChecks": true, got error:
image
because the default type here is:

export declare class FlexOffsetStyleBuilder extends StyleBuilder {
    buildStyles(offset: string, parent: FlexOffsetParent): {
        [x: string]: string;
        'margin-top'?: undefined;    // error here
    } | {
        'margin-top': string;
    };
}

If with "strictNullChecks": false, got no error, so here just correct the return type of buildStyles.

Fix #928

@CaerusKaru @ThomasBurleson

@Teamop Teamop changed the title fix(flex-offset): correct type when using with 'strictNullChecks' fix(flex-offset): correct return type when using with 'strictNullChecks' Dec 17, 2018
@Teamop Teamop closed this Dec 17, 2018
@Teamop Teamop reopened this Dec 17, 2018
@Teamop
Copy link
Contributor Author

Teamop commented Dec 17, 2018

Don't know why the checks don't run...

@CaerusKaru
Copy link
Member

@Teamop try it now. Also please enable strictNullChecks in the demo-app so we can test for this moving forward.

@Teamop
Copy link
Contributor Author

Teamop commented Dec 17, 2018

@CaerusKaru done

Copy link
Member

@CaerusKaru CaerusKaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CaerusKaru CaerusKaru merged commit 21b6d29 into angular:master Dec 17, 2018
@CaerusKaru
Copy link
Member

@Teamop thank you for patching this!

@iNViTiON
Copy link

iNViTiON commented Dec 17, 2018

Thank you. Fast fix.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

strictNullChecks cause production build error in 7.0.0-beta.20 and 7.0.0-beta.21
4 participants