mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: update the target to ES2022 (#10574)
This commit is contained in:
parent
a419abf509
commit
88439f913e
@ -29,8 +29,8 @@ const windowHandle = await page.evaluateHandle(() => window);
|
|||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description |
|
| Property | Modifiers | Type | Description |
|
||||||
| ---------------------- | --------------------- | ---- | -------------------------------------------------------------- |
|
| -------- | --------------------- | ---- | -------------------------------------------------------------- |
|
||||||
| \[\_\_JSHandleSymbol\] | <code>optional</code> | T | Used for nominally typing [JSHandle](./puppeteer.jshandle.md). |
|
| \_ | <code>optional</code> | T | Used for nominally typing [JSHandle](./puppeteer.jshandle.md). |
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
|
@ -22,8 +22,6 @@ import {EvaluateFuncWith, HandleFor, HandleOr} from '../common/types.js';
|
|||||||
|
|
||||||
import {ElementHandle} from './ElementHandle.js';
|
import {ElementHandle} from './ElementHandle.js';
|
||||||
|
|
||||||
declare const __JSHandleSymbol: unique symbol;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a reference to a JavaScript object. Instances can be created using
|
* Represents a reference to a JavaScript object. Instances can be created using
|
||||||
* {@link Page.evaluateHandle}.
|
* {@link Page.evaluateHandle}.
|
||||||
@ -49,7 +47,7 @@ export class JSHandle<T = unknown> {
|
|||||||
/**
|
/**
|
||||||
* Used for nominally typing {@link JSHandle}.
|
* Used for nominally typing {@link JSHandle}.
|
||||||
*/
|
*/
|
||||||
[__JSHandleSymbol]?: T;
|
declare _?: T;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
@ -31,7 +31,7 @@ import {
|
|||||||
} from './DeviceRequestPrompt.js';
|
} from './DeviceRequestPrompt.js';
|
||||||
import {ExecutionContext} from './ExecutionContext.js';
|
import {ExecutionContext} from './ExecutionContext.js';
|
||||||
import {FrameManager} from './FrameManager.js';
|
import {FrameManager} from './FrameManager.js';
|
||||||
import {IsolatedWorld, IsolatedWorldChart} from './IsolatedWorld.js';
|
import {IsolatedWorld} from './IsolatedWorld.js';
|
||||||
import {MAIN_WORLD, PUPPETEER_WORLD} from './IsolatedWorlds.js';
|
import {MAIN_WORLD, PUPPETEER_WORLD} from './IsolatedWorlds.js';
|
||||||
import {LazyArg} from './LazyArg.js';
|
import {LazyArg} from './LazyArg.js';
|
||||||
import {LifecycleWatcher, PuppeteerLifeCycleEvent} from './LifecycleWatcher.js';
|
import {LifecycleWatcher, PuppeteerLifeCycleEvent} from './LifecycleWatcher.js';
|
||||||
@ -46,11 +46,9 @@ export class Frame extends BaseFrame {
|
|||||||
#detached = false;
|
#detached = false;
|
||||||
#client!: CDPSession;
|
#client!: CDPSession;
|
||||||
|
|
||||||
override worlds!: IsolatedWorldChart;
|
|
||||||
_frameManager: FrameManager;
|
_frameManager: FrameManager;
|
||||||
override _id: string;
|
override _id: string;
|
||||||
_loaderId = '';
|
_loaderId = '';
|
||||||
override _name?: string;
|
|
||||||
override _hasStartedLoading = false;
|
override _hasStartedLoading = false;
|
||||||
_lifecycleEvents = new Set<string>();
|
_lifecycleEvents = new Set<string>();
|
||||||
override _parentId?: string;
|
override _parentId?: string;
|
||||||
|
@ -30,17 +30,10 @@ import {
|
|||||||
withSourcePuppeteerURLIfNone,
|
withSourcePuppeteerURLIfNone,
|
||||||
} from './util.js';
|
} from './util.js';
|
||||||
|
|
||||||
declare const __JSHandleSymbol: unique symbol;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
export class CDPJSHandle<T = unknown> extends JSHandle<T> {
|
export class CDPJSHandle<T = unknown> extends JSHandle<T> {
|
||||||
/**
|
|
||||||
* Used for nominally typing {@link JSHandle}.
|
|
||||||
*/
|
|
||||||
[__JSHandleSymbol]?: T;
|
|
||||||
|
|
||||||
#disposed = false;
|
#disposed = false;
|
||||||
#context: ExecutionContext;
|
#context: ExecutionContext;
|
||||||
#remoteObject: Protocol.Runtime.RemoteObject;
|
#remoteObject: Protocol.Runtime.RemoteObject;
|
||||||
|
@ -228,7 +228,6 @@ export class WaitTask<T = unknown> {
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error TODO: uncomment once cause is supported in Node types.
|
|
||||||
return new Error('WaitTask failed with an error', {
|
return new Error('WaitTask failed with an error', {
|
||||||
cause: error,
|
cause: error,
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
"strictFunctionTypes": true,
|
"strictFunctionTypes": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"strictPropertyInitialization": true,
|
"strictPropertyInitialization": true,
|
||||||
"target": "ES2021",
|
"target": "ES2022",
|
||||||
"useUnknownInCatchVariables": true,
|
"useUnknownInCatchVariables": true,
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user