Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/automation/tools/copy-driver-definition.js')
-rw-r--r--test/automation/tools/copy-driver-definition.js26
1 files changed, 3 insertions, 23 deletions
diff --git a/test/automation/tools/copy-driver-definition.js b/test/automation/tools/copy-driver-definition.js
index cf757ecbc38..36352008a47 100644
--- a/test/automation/tools/copy-driver-definition.js
+++ b/test/automation/tools/copy-driver-definition.js
@@ -21,34 +21,14 @@ contents = `/*------------------------------------------------------------------
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
-/**
- * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
- * and others. This API makes no assumption about what promise library is being used which
- * enables reusing existing code without migrating to a specific promise implementation. Still,
- * we recommend the use of native promises which are available in this editor.
- */
-interface Thenable<T> {
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
- then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
-}
-
${contents}
-
-export interface IDisposable {
- dispose(): void;
-}
-
-export function connect(outPath: string, handle: string): Promise<{ client: IDisposable, driver: IDriver }>;
`;
const srcPath = path.join(path.dirname(__dirname), 'src');
const outPath = path.join(path.dirname(__dirname), 'out');
+if (!fs.existsSync(outPath)) {
+ fs.mkdirSync(outPath);
+}
fs.writeFileSync(path.join(srcPath, 'driver.d.ts'), contents);
fs.writeFileSync(path.join(outPath, 'driver.d.ts'), contents);