src/vs/workbench/common/editor.ts/isUntitledResourceEditorInput
export function isUntitledResourceEditorInput(editor: IUntypedEditorInput): editor is IUntitledTextResourceEditorInput {
	const candidate = editor as IUntitledTextResourceEditorInput;

	return candidate.resource === undefined || candidate.resource.scheme === Schemas.untitled;
}