本文整理汇总了TypeScript中@nteract/core.actions.overwriteMetadataField方法的典型用法代码示例。如果您正苦于以下问题:TypeScript actions.overwriteMetadataField方法的具体用法?TypeScript actions.overwriteMetadataField怎么用?TypeScript actions.overwriteMetadataField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@nteract/core.actions
的用法示例。
在下文中一共展示了actions.overwriteMetadataField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: mergeMap
mergeMap(xhr => {
const notificationSystem = selectors.notificationSystem(state$.value);
const { id, login } = xhr.response;
// NOTE: One day we need to make this part of our proper store
// instead of hidden side effects
notificationSystem.addNotification({
title: "Gist uploaded",
message: "đ đ˘",
dismissible: true,
position: "tr",
level: "success",
action: {
label: "Open Gist",
callback() {
shell.openExternal(`https://nbviewer.jupyter.org/${id}`);
}
}
});
// TODO: Turn this into one action that does both, even if its
// sometimes a no-op
return of(
actions.overwriteMetadataField({
field: "github_username",
value: login,
contentRef
}),
actions.overwriteMetadataField({
field: "gist_id",
value: id,
contentRef
})
);
}),