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