mirror of
https://github.com/Microsoft/vscode
synced 2024-10-04 02:14:06 +00:00
Update type guard (#204763)
This commit is contained in:
parent
c1021c9573
commit
5303197950
|
@ -42,7 +42,7 @@ class Temp {
|
|||
}
|
||||
}
|
||||
function isCreateProvisionedFilesErrorResponse(response) {
|
||||
return response?.ErrorDetails !== undefined;
|
||||
return response?.ErrorDetails?.Code !== undefined;
|
||||
}
|
||||
class ProvisionService {
|
||||
log;
|
||||
|
|
|
@ -70,7 +70,7 @@ interface CreateProvisionedFilesErrorResponse {
|
|||
type CreateProvisionedFilesResponse = CreateProvisionedFilesSuccessResponse | CreateProvisionedFilesErrorResponse;
|
||||
|
||||
function isCreateProvisionedFilesErrorResponse(response: unknown): response is CreateProvisionedFilesErrorResponse {
|
||||
return (response as CreateProvisionedFilesErrorResponse)?.ErrorDetails !== undefined;
|
||||
return (response as CreateProvisionedFilesErrorResponse)?.ErrorDetails?.Code !== undefined;
|
||||
}
|
||||
|
||||
class ProvisionService {
|
||||
|
|
Loading…
Reference in a new issue