From 38e1c355dd456e83be3a56e764febf2f1c819903 Mon Sep 17 00:00:00 2001 From: slyrz Date: Fri, 30 Nov 2018 13:23:22 +0100 Subject: [PATCH] Remove Promise in Request.frame function The type definition of the Request class declares the return type of the frame() function as Promise, but it should be Frame | null only. --- types/puppeteer/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index cbb31f2fd0..d90f02f8b8 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -968,7 +968,7 @@ export interface Request { /** * @returns The `Frame` object that initiated the request, or `null` if navigating to error pages */ - frame(): Promise; + frame(): Frame | null; /** * An object with HTTP headers associated with the request.