A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
/** Compiler diagnostics when present; otherwise preserve process/filesystem failures. */
export function exampleFailureLines(error) {
const all = [...new Set([error?.message, error?.stderr?.toString(), error?.stdout?.toString()]
.filter(Boolean).flatMap(text => text.split(/\r?\n/)).map(line => line.trim()).filter(Boolean))];
const typed = all.filter(line => line.includes('error TS'));
return typed.length ? typed : all.length ? all : ['Example check failed without diagnostics.'];
}