本文整理汇总了TypeScript中@nteract/types.AppRecord类的典型用法代码示例。如果您正苦于以下问题:TypeScript AppRecord类的具体用法?TypeScript AppRecord怎么用?TypeScript AppRecord使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AppRecord类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: setNotificationsSystem
function setNotificationsSystem(
state: AppRecord,
action: SetNotificationSystemAction
): RecordOf<AppRecordProps> {
if (!action.payload || !action.payload.notificationSystem) {
return state;
}
return state.set("notificationSystem", action.payload.notificationSystem);
}
示例2: setAppHost
function setAppHost(
state: AppRecord,
action: SetAppHostAction
): RecordOf<AppRecordProps> {
return state.set("host", action.payload);
}
示例3: saveFulfilled
function saveFulfilled(state: AppRecord): RecordOf<AppRecordProps> {
return state.set("isSaving", false).set("lastSaved", new Date());
}
示例4: saveFailed
function saveFailed(state: AppRecord): RecordOf<AppRecordProps> {
return state.set("isSaving", false);
}
示例5: save
function save(state: AppRecord): RecordOf<AppRecordProps> {
return state.set("isSaving", true);
}
示例6: setGithubToken
function setGithubToken(
state: AppRecord,
action: SetGithubTokenAction
): RecordOf<AppRecordProps> {
return state.set("githubToken", action.payload.githubToken);
}