提交 5ccbc56c 编写于 作者: J Johannes Rieken

also make null-lovers happy, #71992

上级 261fa9f9
......@@ -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 {
......
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册