Skip to content

Conversation

@DonJayamanne
Copy link

For #10496

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

}
const model = await this.notebookStorage.load(uri, undefined, !openContext.backupId);
// If there's no backup id, then skip loading dirty contents.
const model = await (openContext.backupId
Copy link
Member

Choose a reason for hiding this comment

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

Out of typescript noob interest. Why doesn't notebookStorage.load unify the last boolean | string type up the method chain?

Copy link
Author

Choose a reason for hiding this comment

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

TS isn't smart enough, it didn't work, the union type doesn't work across overloaded functions. if we want to use union type then the argument needs to be a union type.
Hate it., looks super sucky

Copy link
Member

Choose a reason for hiding this comment

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

Bleh, well that make sense. Just looked funny to me.

@DonJayamanne DonJayamanne merged commit ae8903d into microsoft:master Jun 18, 2020
@DonJayamanne DonJayamanne deleted the fixRevert branch June 18, 2020 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No news entry required

4 participants