File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 31
31
32
32
### url
33
33
34
- • ** url** : ` string ` \| () => ` string ` \| ` Promise ` <` string ` \>
34
+ • ** url** : ` string ` \| ` Promise ` < ` string ` \> \| () => ` string ` \| ` Promise ` <` string ` \>
35
35
36
36
The URL of the GraphQL server for the audit.
37
37
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export interface ServerAuditOptions {
24
24
* A function can be also supplied, in this case -
25
25
* every audit will invoke the function to get the URL.
26
26
*/
27
- url : string | ( ( ) => string | Promise < string > ) ;
27
+ url : string | Promise < string > | ( ( ) => string | Promise < string > ) ;
28
28
/**
29
29
* The Fetch function to use.
30
30
*
@@ -950,10 +950,10 @@ export async function auditServer(
950
950
951
951
/** @private */
952
952
async function getUrl (
953
- url : string | ( ( ) => string | Promise < string > ) ,
953
+ url : string | Promise < string > | ( ( ) => string | Promise < string > ) ,
954
954
) : Promise < string > {
955
- if ( typeof url === 'string ' ) {
956
- return url ;
955
+ if ( typeof url === 'function ' ) {
956
+ return await url ( ) ;
957
957
}
958
- return await url ( ) ;
958
+ return url ;
959
959
}
You can’t perform that action at this time.
0 commit comments