Skip to content

Commit 7b4bf4a

Browse files
committed
deprecate es5ClassCompat and explain why
1 parent 6779fa3 commit 7b4bf4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/workbench/api/common/extHostTypes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ import { IRelativePatternDto } from 'vs/workbench/api/common/extHost.protocol';
1919
import { CellEditType, ICellPartialMetadataEdit, IDocumentMetadataEdit } from 'vs/workbench/contrib/notebook/common/notebookCommon';
2020
import type * as vscode from 'vscode';
2121

22+
/**
23+
* @deprecated
24+
*
25+
* This utility ensures that old JS code that uses functions for classes still works. Existing usages cannot be removed
26+
* but new ones must not be added
27+
* */
2228
function es5ClassCompat(target: Function): any {
2329
///@ts-expect-error
2430
function _() { return Reflect.construct(target, arguments, this.constructor); }

0 commit comments

Comments
 (0)