( result: Record<PropertyKey, unknown>, key: PropertyKey, node: Node, ctx: Context )
| 892 | |
| 893 | // a site dropping an unknown value would drop its computation too |
| 894 | private overwriteProblem( |
| 895 | result: Record<PropertyKey, unknown>, |
| 896 | key: PropertyKey, |
| 897 | node: Node, |
| 898 | ctx: Context |
| 899 | ): DynamicValue | undefined { |
| 900 | if (!ctx.site) return |
| 901 | const dynamic = findDynamic( |
| 902 | result[key], |
| 903 | dynamic => !this.declaredDynamics.has(dynamic) |
| 904 | ) |
| 905 | return ( |
| 906 | dynamic && |
| 907 | this.reject( |
| 908 | node, |
| 909 | ctx, |
| 910 | "overwrites a value the build does not know", |
| 911 | dynamic.asOperand() |
| 912 | ) |
| 913 | ) |
| 914 | } |
| 915 | |
| 916 | private evaluateUnary( |
| 917 | node: Extract<Node, { type: "UnaryExpression" }>, |
no test coverage detected