( expr: MathJsonExpression | null )
| 80 | * with a non-undefined value. |
| 81 | */ |
| 82 | export function hasMetaData( |
| 83 | expr: MathJsonExpression | null |
| 84 | ): expr is ExpressionObject & Partial<MathJsonAttributes> { |
| 85 | return ( |
| 86 | isExpressionObject(expr) && |
| 87 | ((expr as MathJsonAttributes).latex !== undefined || |
| 88 | (expr as MathJsonAttributes).wikidata !== undefined || |
| 89 | (expr as MathJsonAttributes).sourceOffsets !== undefined) |
| 90 | ); |
| 91 | } |
| 92 | |
| 93 | /** If expr is a string literal, return it. |
| 94 | * |
no test coverage detected