We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It's not good to use the non-null assertion operator if we can avoid it, and we can fix the way defaults are applied to props to make this not needed.
We can change the following output
public constructor(scope: cdk.App, id: string, props: NoctStackProps) { super(scope, id, props); // Applying default props props = { ...props, myProperty: props.myProperty ?? '',
To the below output
public constructor(scope: cdk.App, id: string, originalProps: NoctStackProps) { super(scope, id, originalProps); // Applying default props const props = { ...originalProps, myProperty: originalProps.myProperty ?? '',
And now props has non nullable types and does not need non-null assertions everywhere.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It's not good to use the non-null assertion operator if we can avoid it, and we can fix the way defaults are applied to props to make this not needed.
We can change the following output
To the below output
And now props has non nullable types and does not need non-null assertions everywhere.
The text was updated successfully, but these errors were encountered: