File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- import type { Browser , PuppeteerLaunchOptions } from 'puppeteer-core'
1+ import type { Browser , LaunchOptions } from 'puppeteer-core'
22import puppeteer from 'puppeteer-extra'
33import StealthPlugin from 'puppeteer-extra-plugin-stealth'
44
55// eslint-disable-next-line functional/no-expression-statements
66puppeteer . use ( StealthPlugin ( ) )
77
88export const Chromium = ( ( ) => {
9- const instances : WeakMap < PuppeteerLaunchOptions , Browser > = new WeakMap ( )
9+ const instances : WeakMap < LaunchOptions , Browser > = new WeakMap ( )
1010
11- const createInstance = ( options : PuppeteerLaunchOptions ) => {
11+ const createInstance = ( options : LaunchOptions ) => {
1212 // eslint-disable-next-line functional/no-expression-statements
1313 console . log ( '&&&&&' , 'new chromium instanse will be created' )
1414 return puppeteer . launch ( options )
1515 }
1616
1717 return {
18- getInstance : async ( options : PuppeteerLaunchOptions ) => {
18+ getInstance : async ( options : LaunchOptions ) => {
1919 const fromCache = instances . get ( options )
2020 const instance = fromCache
2121 ? fromCache
You can’t perform that action at this time.
0 commit comments