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 3131
3232### url
3333
34- • ** url** : ` string ` \| () => ` string ` \| ` Promise ` <` string ` \>
34+ • ** url** : ` string ` \| ` Promise ` < ` string ` \> \| () => ` string ` \| ` Promise ` <` string ` \>
3535
3636The URL of the GraphQL server for the audit.
3737
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export interface ServerAuditOptions {
2424 * A function can be also supplied, in this case -
2525 * every audit will invoke the function to get the URL.
2626 */
27- url : string | ( ( ) => string | Promise < string > ) ;
27+ url : string | Promise < string > | ( ( ) => string | Promise < string > ) ;
2828 /**
2929 * The Fetch function to use.
3030 *
@@ -950,10 +950,10 @@ export async function auditServer(
950950
951951/** @private */
952952async function getUrl (
953- url : string | ( ( ) => string | Promise < string > ) ,
953+ url : string | Promise < string > | ( ( ) => string | Promise < string > ) ,
954954) : Promise < string > {
955- if ( typeof url === 'string ' ) {
956- return url ;
955+ if ( typeof url === 'function ' ) {
956+ return await url ( ) ;
957957 }
958- return await url ( ) ;
958+ return url ;
959959}
You can’t perform that action at this time.
0 commit comments