Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Fresh Redux Snapshot Access - 2
作成日
3 か月前
差分は期限切れになりません
クリア
エクスポート
共有
説明
11 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
35 行
すべてコピー
8 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
33 行
すべてコピー
export function serializeTask(t: GanttTask): SerializedTask {
export function serializeTask(t: GanttTask): SerializedTask {
コピー
コピー済み
コピー
コピー済み
const startDate =
t.start_date instanceof Date
const startDate =
dateToISO(
t.start_date
as Date |
string
|
null
| undefined);
? t.start_date.toISOString()
: typeof
t.start_date
=== "
string
"
? t.start_date
:
null
;
return {
return {
id: t.id,
id: t.id,
text: t.text,
text: t.text,
start_date: startDate,
start_date: startDate,
duration: t.duration ?? 1,
duration: t.duration ?? 1,
progress: Number(t.progress) || 0,
progress: Number(t.progress) || 0,
parent: t.parent ?? 0,
parent: t.parent ?? 0,
type: t.type ?? "task",
type: t.type ?? "task",
open: t.open,
open: t.open,
sortorder: (t as any).sortorder ?? 0,
sortorder: (t as any).sortorder ?? 0,
assignee_user_id: (t as any).assignee_user_id ?? null,
assignee_user_id: (t as any).assignee_user_id ?? null,
};
};
}
}
コピー
コピー済み
コピー
コピー済み
/** Convert a serialized task back to a Gantt Task (with Date objects). */
/** Convert a serialized task back to a Gantt Task (with Date objects). */
export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } {
export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } {
return {
return {
id: s.id,
id: s.id,
text: s.text,
text: s.text,
コピー
コピー済み
コピー
コピー済み
start_date:
s.start_date ? new Date
(s.start_date)
: new Date()
,
start_date:
isoToDate
(s.start_date)
,
duration: s.duration,
duration: s.duration,
progress: s.progress,
progress: s.progress,
parent: s.parent,
parent: s.parent,
type: s.type as GanttTask["type"],
type: s.type as GanttTask["type"],
open: s.open,
open: s.open,
sortorder: s.sortorder,
sortorder: s.sortorder,
assignee_user_id: s.assignee_user_id,
assignee_user_id: s.assignee_user_id,
} as any;
} as any;
コピー
コピー済み
コピー
コピー済み
}
保存された差分
原文
ファイルを開く
export function serializeTask(t: GanttTask): SerializedTask { const startDate = t.start_date instanceof Date ? t.start_date.toISOString() : typeof t.start_date === "string" ? t.start_date : null; return { id: t.id, text: t.text, start_date: startDate, duration: t.duration ?? 1, progress: Number(t.progress) || 0, parent: t.parent ?? 0, type: t.type ?? "task", open: t.open, sortorder: (t as any).sortorder ?? 0, assignee_user_id: (t as any).assignee_user_id ?? null, }; } /** Convert a serialized task back to a Gantt Task (with Date objects). */ export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } { return { id: s.id, text: s.text, start_date: s.start_date ? new Date(s.start_date) : new Date(), duration: s.duration, progress: s.progress, parent: s.parent, type: s.type as GanttTask["type"], open: s.open, sortorder: s.sortorder, assignee_user_id: s.assignee_user_id, } as any; }
変更されたテキスト
ファイルを開く
export function serializeTask(t: GanttTask): SerializedTask { const startDate = dateToISO(t.start_date as Date | string | null | undefined); return { id: t.id, text: t.text, start_date: startDate, duration: t.duration ?? 1, progress: Number(t.progress) || 0, parent: t.parent ?? 0, type: t.type ?? "task", open: t.open, sortorder: (t as any).sortorder ?? 0, assignee_user_id: (t as any).assignee_user_id ?? null, }; } /** Convert a serialized task back to a Gantt Task (with Date objects). */ export function deserializeTask(s: SerializedTask): GanttTask & { sortorder: number; assignee_user_id?: string | null } { return { id: s.id, text: s.text, start_date: isoToDate(s.start_date), duration: s.duration, progress: s.progress, parent: s.parent, type: s.type as GanttTask["type"], open: s.open, sortorder: s.sortorder, assignee_user_id: s.assignee_user_id, } as any;
違いを見つける