9 lines
276 B
TypeScript
9 lines
276 B
TypeScript
/** Keep malformed structured values visibly invalid instead of displaying [object Object]. */
|
|
export function inputText(value: unknown): string {
|
|
if (typeof value === 'object' && value !== null) {
|
|
return '[valor não textual]';
|
|
}
|
|
|
|
return String(value);
|
|
}
|