mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
75 lines
1.1 KiB
Markdown
75 lines
1.1 KiB
Markdown
|
---
|
||
|
sidebar_label: CLI.(constructor)
|
||
|
---
|
||
|
|
||
|
# CLI.(constructor)
|
||
|
|
||
|
Constructs a new instance of the `CLI` class
|
||
|
|
||
|
#### Signature:
|
||
|
|
||
|
```typescript
|
||
|
class CLI {
|
||
|
constructor(
|
||
|
opts?:
|
||
|
| string
|
||
|
| {
|
||
|
cachePath?: string;
|
||
|
scriptName?: string;
|
||
|
prefixCommand?: {
|
||
|
cmd: string;
|
||
|
description: string;
|
||
|
};
|
||
|
allowCachePathOverride?: boolean;
|
||
|
pinnedBrowsers?: Partial<{
|
||
|
[key in Browser]: string;
|
||
|
}>;
|
||
|
},
|
||
|
rl?: readline.Interface
|
||
|
);
|
||
|
}
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
<table><thead><tr><th>
|
||
|
|
||
|
Parameter
|
||
|
|
||
|
</th><th>
|
||
|
|
||
|
Type
|
||
|
|
||
|
</th><th>
|
||
|
|
||
|
Description
|
||
|
|
||
|
</th></tr></thead>
|
||
|
<tbody><tr><td>
|
||
|
|
||
|
opts
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
string \| { cachePath?: string; scriptName?: string; prefixCommand?: { cmd: string; description: string; }; allowCachePathOverride?: boolean; pinnedBrowsers?: Partial<{ \[key in [Browser](./browsers.browser.md)\]: string; }>; }
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
_(Optional)_
|
||
|
|
||
|
</td></tr>
|
||
|
<tr><td>
|
||
|
|
||
|
rl
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
readline.Interface
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
_(Optional)_
|
||
|
|
||
|
</td></tr>
|
||
|
</tbody></table>
|