src/vs/workbench/services/editor/common/editorGroupsService.ts/isEditorReplacement
export function isEditorReplacement(obj: unknown): obj is IEditorReplacement {
	const candidate = obj as IEditorReplacement | undefined;

	return !!candidate && isEditorInput(candidate.editor) && isEditorInput(candidate.replacement);
}