本文整理汇总了TypeScript中vs/editor/common/core/position.Position.isIPosition方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Position.isIPosition方法的具体用法?TypeScript Position.isIPosition怎么用?TypeScript Position.isIPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/editor/common/core/position.Position
的用法示例。
在下文中一共展示了Position.isIPosition方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: _moveToNextMatch
private _moveToNextMatch(arg: any): void {
// @sandeep TS(2.0.2) - Adding cast to keep semantic. Necessary since the test are for interface but the code expects
// implemations.
let nextMatch = Range.isIRange(arg) ? arg : Position.isIPosition(arg) ? this._getNextMatch(arg as Position) : null;
if (nextMatch) {
this._setCurrentFindMatch(nextMatch as Range);
}
}
示例2: registerLanguageCommand
registerLanguageCommand('_executeFormatOnTypeProvider', function (accessor, args) {
const { resource, position, ch, options } = args;
if (!(resource instanceof URI) || !Position.isIPosition(position) || typeof ch !== 'string') {
throw illegalArgument();
}
const model = accessor.get(IModelService).getModel(resource);
if (!model) {
throw illegalArgument('resource');
}
return getOnTypeFormattingEdits(accessor.get(IEditorWorkerService), model, Position.lift(position), ch, options);
});
示例3:
getAnchor: () => {
if (Position.isIPosition(at)) {
at = this._toCoords(at);
}
return at;
},
示例4: _moveToNextMatch
private _moveToNextMatch(arg: any): void {
let nextMatch = Range.isIRange(arg) ? arg : Position.isIPosition(arg) ? this._getNextMatch(arg) : null;
if (nextMatch) {
this._setCurrentFindMatch(nextMatch);
}
}