本文整理匯總了TypeScript中vs/base/common/uri.isURI函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript isURI函數的具體用法?TypeScript isURI怎麽用?TypeScript isURI使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了isURI函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: equals
public equals(other:any):boolean {
if (this.toString() !== String(other)) {
return false;
}
return ((other instanceof URL) || URI.isURI(other));
}
示例2: function
CommonEditorRegistry.registerLanguageCommand('_executeFormatRangeProvider', function(accessor, args) {
const {resource, range, options} = args;
if (!URI.isURI(resource) || !Range.isIRange(range)) {
throw illegalArgument();
}
const model = accessor.get(IModelService).getModel(resource);
if (!model) {
throw illegalArgument('resource');
}
return formatRange(model, range, options);
});
示例3: function
CommonEditorRegistry.registerLanguageCommand('_executeDocumentSymbolProvider', function(accessor, args) {
const {resource} = args;
if (!URI.isURI(resource)) {
throw illegalArgument('resource');
}
const model = accessor.get(IModelService).getModel(resource);
if (!model) {
throw illegalArgument('resource');
}
return getOutlineEntries(model);
});
示例4: function
CommonEditorRegistry.registerLanguageCommand('_executeCodeLensProvider', function(accessor, args) {
const {resource} = args;
if (!URI.isURI(resource)) {
throw illegalArgument();
}
const model = accessor.get(IModelService).getModel(resource);
if (!model) {
throw illegalArgument();
}
return getCodeLensData(model);
});