本文整理汇总了TypeScript中vs/workbench/parts/debug/node/debugAdapter.Adapter.merge方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Adapter.merge方法的具体用法?TypeScript Adapter.merge怎么用?TypeScript Adapter.merge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/workbench/parts/debug/node/debugAdapter.Adapter
的用法示例。
在下文中一共展示了Adapter.merge方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test('merge', () => {
const da: IRawAdapter = {
type: 'mock',
win: {
runtime: 'winRuntime'
},
linux: {
runtime: 'linuxRuntime'
},
osx: {
runtime: 'osxRuntime'
},
runtimeArgs: ['first arg'],
program: 'mockprogram',
args: ['arg']
};
adapter.merge(da, {
name: 'my name',
id: 'my_id',
version: '1.0',
publisher: 'mockPublisher',
isBuiltin: true,
extensionFolderPath: 'a/b/c/d',
engines: null
});
return adapter.getAdapterExecutable(undefined, false).then(details => {
assert.equal(details.command, platform.isLinux ? da.linux.runtime : platform.isMacintosh ? da.osx.runtime : da.win.runtime);
assert.deepEqual(details.args, da.runtimeArgs.concat(['a/b/c/d/mockprogram'].concat(da.args)));
});
});
示例2: test
test('merge', () => {
const runtimeArgs = ['first arg'];
adapter.merge({
type: 'mock',
runtimeArgs,
program: 'mockprogram'
}, {
name: 'my name',
id: 'my_id',
version: '1.0',
publisher: 'mockPublisher',
isBuiltin: true,
extensionFolderPath: 'a/b/c/d',
engines: null
});
assert.deepEqual(adapter.runtimeArgs, runtimeArgs);
assert.equal(adapter.program, 'a/b/c/d/mockprogram');
});