@@ -1753,26 +1753,6 @@ export enum TaskScope {
17531753 Workspace = 2
17541754}
17551755
1756- export class CustomExecution implements vscode . CustomExecution {
1757- private _callback : ( args : any , cancellationToken : vscode . CancellationToken ) => Thenable < number > ;
1758-
1759- constructor ( callback : ( args : any , cancellationToken : vscode . CancellationToken ) => Thenable < number > ) {
1760- this . _callback = callback ;
1761- }
1762-
1763- public computeId ( ) : string {
1764- return 'customExecution' + generateUuid ( ) ;
1765- }
1766-
1767- public set callback ( value : ( args : any , cancellationToken : vscode . CancellationToken ) => Thenable < number > ) {
1768- this . _callback = value ;
1769- }
1770-
1771- public get callback ( ) : ( args : any , cancellationToken : vscode . CancellationToken ) => Thenable < number > {
1772- return this . _callback ;
1773- }
1774- }
1775-
17761756export class CustomExecution2 implements vscode . CustomExecution2 {
17771757 private _callback : ( ) => Thenable < vscode . Pseudoterminal > ;
17781758 constructor ( callback : ( ) => Thenable < vscode . Pseudoterminal > ) {
@@ -1804,7 +1784,7 @@ export class Task implements vscode.Task2 {
18041784 private _definition : vscode . TaskDefinition ;
18051785 private _scope : vscode . TaskScope . Global | vscode . TaskScope . Workspace | vscode . WorkspaceFolder | undefined ;
18061786 private _name : string ;
1807- private _execution : ProcessExecution | ShellExecution | CustomExecution | CustomExecution2 | undefined ;
1787+ private _execution : ProcessExecution | ShellExecution | CustomExecution2 | undefined ;
18081788 private _problemMatchers : string [ ] ;
18091789 private _hasDefinedMatchers : boolean ;
18101790 private _isBackground : boolean ;
@@ -1813,8 +1793,8 @@ export class Task implements vscode.Task2 {
18131793 private _presentationOptions : vscode . TaskPresentationOptions ;
18141794 private _runOptions : vscode . RunOptions ;
18151795
1816- constructor ( definition : vscode . TaskDefinition , name : string , source : string , execution ?: ProcessExecution | ShellExecution | CustomExecution | CustomExecution2 , problemMatchers ?: string | string [ ] ) ;
1817- constructor ( definition : vscode . TaskDefinition , scope : vscode . TaskScope . Global | vscode . TaskScope . Workspace | vscode . WorkspaceFolder , name : string , source : string , execution ?: ProcessExecution | ShellExecution | CustomExecution | CustomExecution2 , problemMatchers ?: string | string [ ] ) ;
1796+ constructor ( definition : vscode . TaskDefinition , name : string , source : string , execution ?: ProcessExecution | ShellExecution | CustomExecution2 , problemMatchers ?: string | string [ ] ) ;
1797+ constructor ( definition : vscode . TaskDefinition , scope : vscode . TaskScope . Global | vscode . TaskScope . Workspace | vscode . WorkspaceFolder , name : string , source : string , execution ?: ProcessExecution | ShellExecution | CustomExecution2 , problemMatchers ?: string | string [ ] ) ;
18181798 constructor ( definition : vscode . TaskDefinition , arg2 : string | ( vscode . TaskScope . Global | vscode . TaskScope . Workspace ) | vscode . WorkspaceFolder , arg3 : any , arg4 ?: any , arg5 ?: any , arg6 ?: any ) {
18191799 this . definition = definition ;
18201800 let problemMatchers : string | string [ ] ;
@@ -1879,7 +1859,7 @@ export class Task implements vscode.Task2 {
18791859 type : Task . ShellType ,
18801860 id : this . _execution . computeId ( )
18811861 } ;
1882- } else if ( this . _execution instanceof CustomExecution ) {
1862+ } else if ( this . _execution instanceof CustomExecution2 ) {
18831863 this . _definition = {
18841864 type : Task . ExtensionCallbackType ,
18851865 id : this . _execution . computeId ( )
@@ -1926,18 +1906,18 @@ export class Task implements vscode.Task2 {
19261906 }
19271907
19281908 get execution ( ) : ProcessExecution | ShellExecution | undefined {
1929- return ( ( this . _execution instanceof CustomExecution ) || ( this . _execution instanceof CustomExecution2 ) ) ? undefined : this . _execution ;
1909+ return ( this . _execution instanceof CustomExecution2 ) ? undefined : this . _execution ;
19301910 }
19311911
19321912 set execution ( value : ProcessExecution | ShellExecution | undefined ) {
19331913 this . execution2 = value ;
19341914 }
19351915
1936- get execution2 ( ) : ProcessExecution | ShellExecution | CustomExecution | CustomExecution2 | undefined {
1916+ get execution2 ( ) : ProcessExecution | ShellExecution | CustomExecution2 | undefined {
19371917 return this . _execution ;
19381918 }
19391919
1940- set execution2 ( value : ProcessExecution | ShellExecution | CustomExecution | CustomExecution2 | undefined ) {
1920+ set execution2 ( value : ProcessExecution | ShellExecution | CustomExecution2 | undefined ) {
19411921 if ( value === null ) {
19421922 value = undefined ;
19431923 }
0 commit comments