Skip to content

Commit 9d14980

Browse files
committed
make options an optional param
1 parent 068241a commit 9d14980

File tree

1 file changed

+2
-2
lines changed
  • packages/core/src/shared/vscode

1 file changed

+2
-2
lines changed

packages/core/src/shared/vscode/env.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export { extensionVersion }
6767
*
6868
* @param throwWhen Throw if minimum vscode is equal or later than this version.
6969
*/
70-
export function isMinVscode(options: { throwWhen: string }): boolean {
70+
export function isMinVscode(options?: { throwWhen: string }): boolean {
7171
const minVscode = getMinVscodeVersion()
72-
if (options.throwWhen && semver.gte(minVscode, options.throwWhen)) {
72+
if (options?.throwWhen && semver.gte(minVscode, options.throwWhen)) {
7373
throw Error(`Min vscode ${minVscode} >= ${options.throwWhen}. Delete or update the code that called this.`)
7474
}
7575
return vscode.version.startsWith(getMinVscodeVersion())

0 commit comments

Comments
 (0)