/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ /** * Returns the error code regardless of the error class. Reads `error.code` from an * {@link AICoreError}; for any other `Error` (such as `CKEditorError`) returns the leading * non-whitespace token of `error.message`. Returns `undefined` for non-Error inputs or empty * messages. * * The whitespace-aware split matters for `CKEditorError`, whose message is * `\nRead more: …` — a plain space split would return `\nRead`. * * Use this at call sites that branch on the error code so they keep working as throw sites * migrate from `CKEditorError` to {@link AICoreError}. */ export declare function getErrorCode(error: unknown): string | undefined;