( id: MathJsonSymbol, scope: Scope )
| 701 | * spellings apart; |
| 702 | * - a string, and any operand that is not `Function`-headed (the shorthand |
| 703 | * `_ > 5` lifts to a literal only later); |
| 704 | * - an operand that is already CANONICAL — its raw structure is gone; |
| 705 | * - a literal with no explicit parameter list, and any parameter that is |
| 706 | * already annotated (an author's annotation is never overwritten). The |
| 707 | * exception is an annotation `unknown`, or a transparent alias of it: it |
| 708 | * is read as a bare parameter (`isUnknownTypedParameter()`), so the slot |
| 709 | * type replaces it. |
| 710 | */ |
| 711 | export function annotateFunctionLiteralParams( |
| 712 | ce: ComputeEngine, |
| 713 | op: ExpressionInput, |
| 714 | paramTypes: ReadonlyArray<Type | undefined> |
| 715 | ): Expression | undefined { |
| 716 | const raw = ce.expr(op, { form: 'raw' }); |
| 717 | if (raw.isCanonical) return undefined; |
| 718 | if (!isFunction(raw, 'Function')) return undefined; |
| 719 |
no test coverage detected