Skip to content

Commit

Permalink
also make null-lovers happy, #71992
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Apr 12, 2019
1 parent 261fa9f commit 5ccbc56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/vs/base/common/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,12 @@ export class URI implements UriComponents {
}

static revive(data: UriComponents | URI): URI;
static revive(data: UriComponents | URI | undefined | null): URI | undefined;
static revive(data: UriComponents | URI | undefined | null): URI | undefined {
static revive(data: UriComponents | URI | undefined): URI | undefined;
static revive(data: UriComponents | URI | null): URI | null;
static revive(data: UriComponents | URI | undefined | null): URI | undefined | null;
static revive(data: UriComponents | URI | undefined | null): URI | undefined | null {
if (!data) {
return undefined;
return data;
} else if (data instanceof URI) {
return data;
} else {
Expand Down
4 changes: 3 additions & 1 deletion src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ declare namespace monaco {
toString(skipEncoding?: boolean): string;
toJSON(): object;
static revive(data: UriComponents | Uri): Uri;
static revive(data: UriComponents | Uri | undefined | null): Uri | undefined;
static revive(data: UriComponents | Uri | undefined): Uri | undefined;
static revive(data: UriComponents | Uri | null): Uri | null;
static revive(data: UriComponents | Uri | undefined | null): Uri | undefined | null;
}

export interface UriComponents {
Expand Down

0 comments on commit 5ccbc56

Please sign in to comment.