本文整理汇总了TypeScript中vs/base/common/platform.setImmediate函数的典型用法代码示例。如果您正苦于以下问题:TypeScript setImmediate函数的具体用法?TypeScript setImmediate怎么用?TypeScript setImmediate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setImmediate函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: function
}, function (err) {
if (!initializing) {
reject(err);
} else {
platform.setImmediate(() => reject(err));
}
});
开发者ID:developers23,项目名称:vscode,代码行数:7,代码来源:winjs.polyfill.promise.ts
示例2: initOrPromise
initOrPromise(function (value) {
if (!initializing) {
resolve(value);
} else {
platform.setImmediate(() => resolve(value));
}
}, function (err) {
开发者ID:developers23,项目名称:vscode,代码行数:7,代码来源:winjs.polyfill.promise.ts
示例3: function
onRejected && function (err) {
if (!sync) {
onRejected(err);
} else {
platform.setImmediate(() => onRejected(err));
}
}
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:7,代码来源:winjs.polyfill.promise.ts
示例4: WinJSPromise
return new WinJSPromise((resolve, reject) => {
platform.setImmediate(() => {
let result;
try {
result = onFulfilled(value);
}
catch (err2) {
reject(err2);
return;
}
resolve(result);
});
});
开发者ID:developers23,项目名称:vscode,代码行数:13,代码来源:winjs.polyfill.promise.ts
示例5: cwd
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { isWindows, isMacintosh, setImmediate } from 'vs/base/common/platform';
interface IProcess {
platform: string;
env: object;
cwd(): string;
nextTick(callback: (...args: any[]) => void): number;
}
declare const process: IProcess;
const safeProcess: IProcess = (typeof process === 'undefined') ? {
cwd(): string { return '/'; },
env: Object.create(null),
get platform(): string { return isWindows ? 'win32' : isMacintosh ? 'darwin' : 'linux'; },
nextTick(callback: (...args: any[]) => void): number { return setImmediate(callback); }
} : process;
export const cwd = safeProcess.cwd;
export const env = safeProcess.env;
export const platform = safeProcess.platform;
export const nextTick = safeProcess.nextTick;
开发者ID:PKRoma,项目名称:vscode,代码行数:27,代码来源:process.ts
注:本文中的vs/base/common/platform.setImmediate函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论