🤖 Merge PR #46827 [@types/miniprogram] update callback fail object by @rockSandy

* feat: update callback fail object

* feat: add tests
This commit is contained in:
rockSandy 2020-08-17 16:25:21 +08:00 committed by GitHub
parent d0206325a4
commit d62f53ba8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -5,9 +5,9 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface AsyncCallbackFailObject {
errCode: string;
errorMessage: string;
[key: string]: string;
error: number;
errorMessage?: string;
[key: string]: any;
}
interface AsyncCallback<T> {

View File

@ -362,7 +362,12 @@ my.removeSavedFile({
apFilePath: '',
});
my.getLocation({});
my.getLocation({
fail(res) {
res.error;
res.errorMessage;
}
});
my.request({ url: '' });