@barefootjs/jsx 0.40.0 → 0.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/adapters/ambiguous-nil-arithmetic.d.ts +42 -0
  2. package/dist/adapters/ambiguous-nil-arithmetic.d.ts.map +1 -0
  3. package/dist/adapters/attr-plan.d.ts.map +1 -1
  4. package/dist/adapters/boolean-carrier.d.ts +31 -0
  5. package/dist/adapters/boolean-carrier.d.ts.map +1 -0
  6. package/dist/adapters/boolean-result.d.ts +32 -10
  7. package/dist/adapters/boolean-result.d.ts.map +1 -1
  8. package/dist/adapters/brace-delimiter-text.d.ts +18 -0
  9. package/dist/adapters/brace-delimiter-text.d.ts.map +1 -0
  10. package/dist/adapters/callback-method.d.ts +38 -5
  11. package/dist/adapters/callback-method.d.ts.map +1 -1
  12. package/dist/adapters/component-props.d.ts +22 -7
  13. package/dist/adapters/component-props.d.ts.map +1 -1
  14. package/dist/adapters/computed-const.d.ts +28 -1
  15. package/dist/adapters/computed-const.d.ts.map +1 -1
  16. package/dist/adapters/dsl-template-adapter.d.ts +39 -1
  17. package/dist/adapters/dsl-template-adapter.d.ts.map +1 -1
  18. package/dist/adapters/loop-bound-names.d.ts +9 -1
  19. package/dist/adapters/loop-bound-names.d.ts.map +1 -1
  20. package/dist/adapters/loop-row-type.d.ts +52 -0
  21. package/dist/adapters/loop-row-type.d.ts.map +1 -0
  22. package/dist/adapters/nil-reading.d.ts +68 -0
  23. package/dist/adapters/nil-reading.d.ts.map +1 -0
  24. package/dist/adapters/non-primitive-equality.d.ts +33 -0
  25. package/dist/adapters/non-primitive-equality.d.ts.map +1 -0
  26. package/dist/adapters/number-value.d.ts +45 -0
  27. package/dist/adapters/number-value.d.ts.map +1 -0
  28. package/dist/adapters/operand-typing.d.ts +126 -0
  29. package/dist/adapters/operand-typing.d.ts.map +1 -0
  30. package/dist/adapters/parsed-expr-emitter.d.ts +70 -12
  31. package/dist/adapters/parsed-expr-emitter.d.ts.map +1 -1
  32. package/dist/adapters/primitive-plan.d.ts +291 -0
  33. package/dist/adapters/primitive-plan.d.ts.map +1 -0
  34. package/dist/analyzer-context.d.ts +11 -0
  35. package/dist/analyzer-context.d.ts.map +1 -1
  36. package/dist/analyzer.d.ts +34 -0
  37. package/dist/analyzer.d.ts.map +1 -1
  38. package/dist/augment-inherited-props.d.ts +63 -8
  39. package/dist/augment-inherited-props.d.ts.map +1 -1
  40. package/dist/compiler.d.ts.map +1 -1
  41. package/dist/event-handler-name.d.ts +12 -0
  42. package/dist/event-handler-name.d.ts.map +1 -1
  43. package/dist/expression-parser.d.ts +8 -0
  44. package/dist/expression-parser.d.ts.map +1 -1
  45. package/dist/index.d.ts +24 -11
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +5671 -2586
  48. package/dist/ir-to-client-js/build-references.d.ts.map +1 -1
  49. package/dist/ir-to-client-js/child-props-object.d.ts +64 -0
  50. package/dist/ir-to-client-js/child-props-object.d.ts.map +1 -0
  51. package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
  52. package/dist/ir-to-client-js/control-flow/plan/build-component-loop.d.ts.map +1 -1
  53. package/dist/ir-to-client-js/control-flow/plan/build-inner-loop.d.ts +29 -0
  54. package/dist/ir-to-client-js/control-flow/plan/build-inner-loop.d.ts.map +1 -1
  55. package/dist/ir-to-client-js/control-flow/plan/build-lazy-row.d.ts +2 -0
  56. package/dist/ir-to-client-js/control-flow/plan/build-lazy-row.d.ts.map +1 -1
  57. package/dist/ir-to-client-js/control-flow/plan/build-loop-child-arm.d.ts.map +1 -1
  58. package/dist/ir-to-client-js/control-flow/plan/build-reactive-effects.d.ts.map +1 -1
  59. package/dist/ir-to-client-js/control-flow/plan/inner-loop.d.ts +5 -4
  60. package/dist/ir-to-client-js/control-flow/plan/inner-loop.d.ts.map +1 -1
  61. package/dist/ir-to-client-js/control-flow/plan/loop-child-arm.d.ts +2 -0
  62. package/dist/ir-to-client-js/control-flow/plan/loop-child-arm.d.ts.map +1 -1
  63. package/dist/ir-to-client-js/control-flow/plan/loop.d.ts +15 -0
  64. package/dist/ir-to-client-js/control-flow/plan/loop.d.ts.map +1 -1
  65. package/dist/ir-to-client-js/control-flow/plan/reactive-effects.d.ts +2 -0
  66. package/dist/ir-to-client-js/control-flow/plan/reactive-effects.d.ts.map +1 -1
  67. package/dist/ir-to-client-js/control-flow/shared.d.ts.map +1 -1
  68. package/dist/ir-to-client-js/control-flow/stringify/claim-plan.d.ts +22 -0
  69. package/dist/ir-to-client-js/control-flow/stringify/claim-plan.d.ts.map +1 -1
  70. package/dist/ir-to-client-js/control-flow/stringify/component-loop.d.ts.map +1 -1
  71. package/dist/ir-to-client-js/control-flow/stringify/event-listener.d.ts +1 -1
  72. package/dist/ir-to-client-js/control-flow/stringify/event-listener.d.ts.map +1 -1
  73. package/dist/ir-to-client-js/control-flow/stringify/lazy-row.d.ts.map +1 -1
  74. package/dist/ir-to-client-js/html-template.d.ts +3 -2
  75. package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
  76. package/dist/ir-to-client-js/imports.d.ts +2 -2
  77. package/dist/ir-to-client-js/imports.d.ts.map +1 -1
  78. package/dist/ir-to-client-js/index.d.ts +2 -6
  79. package/dist/ir-to-client-js/index.d.ts.map +1 -1
  80. package/dist/ir-to-client-js/plan/build-static-array-child-init.d.ts.map +1 -1
  81. package/dist/ir-to-client-js/plan/static-array-child-init.d.ts +37 -19
  82. package/dist/ir-to-client-js/plan/static-array-child-init.d.ts.map +1 -1
  83. package/dist/ir-to-client-js/prop-handling.d.ts.map +1 -1
  84. package/dist/ir-to-client-js/reactivity.d.ts.map +1 -1
  85. package/dist/ir-to-client-js/safe-html.d.ts +9 -3
  86. package/dist/ir-to-client-js/safe-html.d.ts.map +1 -1
  87. package/dist/ir-to-client-js/stringify/static-array-child-init.d.ts +3 -2
  88. package/dist/ir-to-client-js/stringify/static-array-child-init.d.ts.map +1 -1
  89. package/dist/ir-to-client-js/types.d.ts +30 -0
  90. package/dist/ir-to-client-js/types.d.ts.map +1 -1
  91. package/dist/ir-to-client-js/utils.d.ts +8 -0
  92. package/dist/ir-to-client-js/utils.d.ts.map +1 -1
  93. package/dist/jsx-to-ir.d.ts +1 -0
  94. package/dist/jsx-to-ir.d.ts.map +1 -1
  95. package/dist/nullable-signal-attr.d.ts +95 -10
  96. package/dist/nullable-signal-attr.d.ts.map +1 -1
  97. package/dist/prop-rewrite.d.ts +7 -0
  98. package/dist/prop-rewrite.d.ts.map +1 -1
  99. package/dist/props-binding.d.ts +27 -3
  100. package/dist/props-binding.d.ts.map +1 -1
  101. package/dist/props-object-whole-read.d.ts +15 -0
  102. package/dist/props-object-whole-read.d.ts.map +1 -0
  103. package/dist/rich-type-refusal.d.ts.map +1 -1
  104. package/dist/scope/binding-scope.d.ts +100 -4
  105. package/dist/scope/binding-scope.d.ts.map +1 -1
  106. package/dist/scope/lexical-scope-walk.d.ts +3 -2
  107. package/dist/scope/lexical-scope-walk.d.ts.map +1 -1
  108. package/dist/scope/root-prop-alias.d.ts +16 -0
  109. package/dist/scope/root-prop-alias.d.ts.map +1 -1
  110. package/dist/signal-prop-name-collision.d.ts.map +1 -1
  111. package/dist/ssr-defaults.d.ts +4 -2
  112. package/dist/ssr-defaults.d.ts.map +1 -1
  113. package/dist/ssr-seed-plan.d.ts +14 -0
  114. package/dist/ssr-seed-plan.d.ts.map +1 -1
  115. package/dist/strip-types.d.ts +13 -0
  116. package/dist/strip-types.d.ts.map +1 -1
  117. package/dist/template-parts.d.ts.map +1 -1
  118. package/dist/template-position-walk.d.ts +21 -3
  119. package/dist/template-position-walk.d.ts.map +1 -1
  120. package/dist/types.d.ts +120 -0
  121. package/dist/types.d.ts.map +1 -1
  122. package/package.json +2 -2
  123. package/src/__tests__/__snapshots__/doc-examples.test.ts.snap +3 -3
  124. package/src/__tests__/binding-scope-ratchet.test.ts +12 -2
  125. package/src/__tests__/binding-scope.test.ts +89 -1
  126. package/src/__tests__/body-destructure-props-object-alias.test.ts +123 -0
  127. package/src/__tests__/boolean-carrier.test.ts +74 -0
  128. package/src/__tests__/boolean-result.test.ts +22 -5
  129. package/src/__tests__/brace-delimiter-text.test.ts +26 -0
  130. package/src/__tests__/callback-method.test.ts +62 -2
  131. package/src/__tests__/child-components-in-map.test.ts +1 -1
  132. package/src/__tests__/component-props.test.ts +14 -0
  133. package/src/__tests__/computed-const.test.ts +188 -0
  134. package/src/__tests__/emit-to-string-call.test.ts +2 -1
  135. package/src/__tests__/expression-parser.test.ts +24 -0
  136. package/src/__tests__/hydration-payload-analysis.test.ts +166 -0
  137. package/src/__tests__/issue-2724-prop-alias-loop-not-static.test.ts +7 -7
  138. package/src/__tests__/issue-2754-rest-spread-needs-slot.test.ts +5 -2
  139. package/src/__tests__/issue-2798-static-nested-loop-bindings.test.ts +1 -1
  140. package/src/__tests__/issue-2835-props-type-member-name-collision.test.ts +4 -4
  141. package/src/__tests__/issue-3044-nested-prop-object-array-not-static.test.ts +1 -1
  142. package/src/__tests__/issue-3688-props-spread-child-csr.test.ts +143 -0
  143. package/src/__tests__/issue-3713-props-spread-loop-row.test.ts +65 -0
  144. package/src/__tests__/lookup-literal-const.test.ts +9 -3
  145. package/src/__tests__/loop-index-reactivity.test.ts +2 -2
  146. package/src/__tests__/loop-param-accessor-key-member-safety.test.ts +1 -1
  147. package/src/__tests__/loop-plan.test.ts +1 -1
  148. package/src/__tests__/loop-row-const-initializer-shadow.test.ts +146 -0
  149. package/src/__tests__/loop-row-prop-read.test.ts +111 -0
  150. package/src/__tests__/loop-row-type.test.ts +64 -0
  151. package/src/__tests__/lowering-value-position.test.ts +4 -0
  152. package/src/__tests__/memo-body-expr.test.ts +137 -0
  153. package/src/__tests__/module-const-destructure-default.test.ts +156 -0
  154. package/src/__tests__/nested-loop-index-param.test.ts +1 -1
  155. package/src/__tests__/nested-loop-reactive-attrs.test.ts +2 -2
  156. package/src/__tests__/nested-row-shadowing.test.ts +2 -2
  157. package/src/__tests__/nil-reading.test.ts +77 -0
  158. package/src/__tests__/nullable-signal-attr.test.ts +231 -2
  159. package/src/__tests__/primitive-plan.test.ts +416 -0
  160. package/src/__tests__/profile-binding-ids.test.ts +14 -0
  161. package/src/__tests__/profile-loop-binding-ids.test.ts +2 -2
  162. package/src/__tests__/profile-nested-binding-ids.test.ts +2 -2
  163. package/src/__tests__/props-object-whole-read.test.ts +40 -0
  164. package/src/__tests__/reactive-attrs-in-map.test.ts +1 -1
  165. package/src/__tests__/reactive-factory-inlining.test.ts +4 -1
  166. package/src/__tests__/rest-binding-gaps.test.ts +192 -0
  167. package/src/__tests__/root-prop-alias.test.ts +79 -1
  168. package/src/__tests__/signal-prop-name-collision.test.ts +102 -2
  169. package/src/__tests__/source-file-cache.test.ts +105 -0
  170. package/src/__tests__/ssr-seed-plan.test.ts +43 -0
  171. package/src/__tests__/static-loop-csr-materialize.test.ts +2 -2
  172. package/src/__tests__/static-record-literal-array.test.ts +171 -0
  173. package/src/__tests__/string-concat-identifier.test.ts +40 -1
  174. package/src/__tests__/template-parts-literal-boundary.test.ts +19 -0
  175. package/src/adapters/ambiguous-nil-arithmetic.ts +103 -0
  176. package/src/adapters/attr-plan.ts +6 -2
  177. package/src/adapters/boolean-carrier.ts +76 -0
  178. package/src/adapters/boolean-result.ts +72 -66
  179. package/src/adapters/brace-delimiter-text.ts +25 -0
  180. package/src/adapters/callback-method.ts +151 -27
  181. package/src/adapters/component-props.ts +28 -8
  182. package/src/adapters/computed-const.ts +443 -10
  183. package/src/adapters/dsl-template-adapter.ts +79 -2
  184. package/src/adapters/loop-bound-names.ts +9 -1
  185. package/src/adapters/loop-plan.ts +1 -1
  186. package/src/adapters/loop-row-type.ts +139 -0
  187. package/src/adapters/nil-reading.ts +297 -0
  188. package/src/adapters/non-primitive-equality.ts +92 -0
  189. package/src/adapters/number-value.ts +108 -0
  190. package/src/adapters/operand-typing.ts +522 -0
  191. package/src/adapters/parsed-expr-emitter.ts +154 -19
  192. package/src/adapters/primitive-plan.ts +696 -0
  193. package/src/analyzer-context.ts +14 -0
  194. package/src/analyzer.ts +692 -85
  195. package/src/augment-inherited-props.ts +108 -10
  196. package/src/compiler.ts +17 -0
  197. package/src/event-handler-name.ts +15 -0
  198. package/src/expression-parser.ts +74 -2
  199. package/src/index.ts +45 -9
  200. package/src/ir-to-client-js/build-references.ts +69 -0
  201. package/src/ir-to-client-js/child-props-object.ts +106 -0
  202. package/src/ir-to-client-js/collect-elements.ts +100 -67
  203. package/src/ir-to-client-js/compute-inlinability.ts +1 -1
  204. package/src/ir-to-client-js/control-flow/plan/build-component-loop.ts +15 -1
  205. package/src/ir-to-client-js/control-flow/plan/build-inner-loop.ts +85 -5
  206. package/src/ir-to-client-js/control-flow/plan/build-lazy-row.ts +3 -0
  207. package/src/ir-to-client-js/control-flow/plan/build-loop-child-arm.ts +30 -28
  208. package/src/ir-to-client-js/control-flow/plan/build-reactive-effects.ts +1 -0
  209. package/src/ir-to-client-js/control-flow/plan/inner-loop.ts +5 -4
  210. package/src/ir-to-client-js/control-flow/plan/loop-child-arm.ts +2 -0
  211. package/src/ir-to-client-js/control-flow/plan/loop.ts +12 -0
  212. package/src/ir-to-client-js/control-flow/plan/reactive-effects.ts +2 -0
  213. package/src/ir-to-client-js/control-flow/shared.ts +23 -24
  214. package/src/ir-to-client-js/control-flow/stringify/claim-plan.ts +29 -0
  215. package/src/ir-to-client-js/control-flow/stringify/component-loop.ts +8 -2
  216. package/src/ir-to-client-js/control-flow/stringify/event-listener.ts +8 -1
  217. package/src/ir-to-client-js/control-flow/stringify/inner-loop.ts +8 -7
  218. package/src/ir-to-client-js/control-flow/stringify/lazy-row.ts +8 -7
  219. package/src/ir-to-client-js/control-flow/stringify/loop-child-arm.ts +4 -4
  220. package/src/ir-to-client-js/control-flow/stringify/loop.ts +3 -3
  221. package/src/ir-to-client-js/control-flow/stringify/reactive-effects.ts +6 -6
  222. package/src/ir-to-client-js/emit-reactive.ts +1 -1
  223. package/src/ir-to-client-js/html-template.ts +95 -38
  224. package/src/ir-to-client-js/imports.ts +1 -1
  225. package/src/ir-to-client-js/index.ts +53 -11
  226. package/src/ir-to-client-js/plan/build-static-array-child-init.ts +42 -15
  227. package/src/ir-to-client-js/plan/static-array-child-init.ts +34 -19
  228. package/src/ir-to-client-js/prop-handling.ts +22 -3
  229. package/src/ir-to-client-js/reactivity.ts +14 -0
  230. package/src/ir-to-client-js/safe-html.ts +11 -4
  231. package/src/ir-to-client-js/stringify/static-array-child-init.ts +30 -12
  232. package/src/ir-to-client-js/types.ts +23 -0
  233. package/src/ir-to-client-js/utils.ts +15 -1
  234. package/src/jsx-to-ir.ts +510 -58
  235. package/src/nullable-signal-attr.ts +366 -28
  236. package/src/prop-rewrite.ts +30 -6
  237. package/src/props-binding.ts +54 -3
  238. package/src/props-object-whole-read.ts +87 -0
  239. package/src/rich-type-refusal.ts +2 -1
  240. package/src/scope/binding-scope.ts +203 -11
  241. package/src/scope/lexical-scope-walk.ts +4 -3
  242. package/src/scope/root-prop-alias.ts +23 -0
  243. package/src/signal-prop-name-collision.ts +113 -22
  244. package/src/ssr-defaults.ts +10 -4
  245. package/src/ssr-seed-plan.ts +82 -17
  246. package/src/strip-types.ts +31 -3
  247. package/src/template-parts.ts +21 -1
  248. package/src/template-position-walk.ts +57 -28
  249. package/src/types.ts +117 -0
@@ -0,0 +1,68 @@
1
+ /**
2
+ * The nil-reading rewrite (`spec/js-primitive-semantics.md`, "Nil reading is
3
+ * a tree rewrite"; #3824 step 4a in `spec/js-undefined-value.md`).
4
+ *
5
+ * Every runtime holds JS `null` and `undefined` as one nil, and its
6
+ * primitive helpers (`to_number`, `to_string`, `plus`, the relational ones)
7
+ * read that nil as `null`. Where Phase-1 types say which value a nil stands
8
+ * for, and the consumer's coercion is known statically, the operand is
9
+ * rewritten before planning so that it is never nil:
10
+ *
11
+ * | Consumer | nil reads as `null` | nil reads as `undefined` |
12
+ * | --- | --- | --- |
13
+ * | numeric (`- * / %`, unary `-` / `+`, relational, numeric `+`) | `x ?? 0` | `x ?? NaN` |
14
+ * | string (`+` concatenation, template-literal part) | `x ?? 'null'` | `x ?? 'undefined'` |
15
+ *
16
+ * After the rewrite the operand is non-nil, so the plan can name the native
17
+ * operator (`(n ?? NaN) * 2` stays native) and the helpers never need to
18
+ * know about `undefined`.
19
+ *
20
+ * A `+` whose present branch concatenates and whose nil branch adds
21
+ * (`o.id + 1` with `id?: string`) is split on nil by the numeric row:
22
+ * `(o.id ?? NaN) + 1` is `NaN` for an omitted field and `'o1'` for a present
23
+ * one, because the operand is then a string or a number and the plan takes
24
+ * the runtime's `plus`, which decides per value. With a `null` reading the
25
+ * nil branch is `0 + 1`, as JS's `null + 1`.
26
+ *
27
+ * What the rewrite leaves alone (`spec/js-undefined-value.md` §7 (4)):
28
+ *
29
+ * - A numeric operand whose nil may be either (`n?: number | null`): the
30
+ * template adapters refuse it with BF101 (#3700) where the coercion is
31
+ * static, and keep today's output elsewhere.
32
+ * - A `+` whose other operand is neither a proven number nor a proven
33
+ * string: numeric addition or concatenation is decided at run time, and a
34
+ * nil reading as `undefined` cannot be told from `null` there. It keeps
35
+ * today's output (the runtime's `plus` reads the nil as `null`) until the
36
+ * runtimes carry `undefined` (#3848).
37
+ * - A string operand whose nil may be either (`c?: string | null`): it keeps
38
+ * today's display reading, the empty string, until the runtimes carry
39
+ * `undefined` (#3848).
40
+ * - A nil Phase 1 cannot type (an index read, an untyped value): the
41
+ * runtime's helpers read it as `null`.
42
+ */
43
+ import type { ParsedExpr } from '../expression-parser.ts';
44
+ import type { ScopedOperandTyping } from './operand-typing.ts';
45
+ /** The literal `NaN`, which every emitter spells through its runtime's `number('NaN')`. */
46
+ export declare const NAN_LITERAL: ParsedExpr;
47
+ /**
48
+ * Whether `l ?? r` was built by the rewrite (its right operand is the
49
+ * rewrite's fallback). A target whose host types an absent value as a
50
+ * concrete zero (Go) must give `l` a nillable representation, or refuse:
51
+ * the nil test would see a present `''` / `0` / `false` as absent.
52
+ */
53
+ export declare function isNilReadingFallback(right: ParsedExpr): boolean;
54
+ /**
55
+ * `expr` with the operands of its own coercion rewritten by their nil
56
+ * reading in `typing`'s scope; `expr` itself when nothing changes. Shallow:
57
+ * only `expr`'s direct operands are rewritten, as `emitParsedExpr` calls it
58
+ * at every node it dispatches. Idempotent: a rewritten operand is never nil.
59
+ */
60
+ export declare function rewriteNilReadings(expr: ParsedExpr, typing: ScopedOperandTyping): ParsedExpr;
61
+ /**
62
+ * {@link rewriteNilReadings} at every node of `expr`, children first, for a
63
+ * tree a template adapter hands to the runtime evaluator or to its own
64
+ * walker instead of `emitParsedExpr` (a callback body, a memo body). An
65
+ * arrow's params shadow outer names within its body.
66
+ */
67
+ export declare function rewriteNilReadingsDeep(expr: ParsedExpr, typing: ScopedOperandTyping): ParsedExpr;
68
+ //# sourceMappingURL=nil-reading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nil-reading.d.ts","sourceRoot":"","sources":["../../src/adapters/nil-reading.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,yBAAyB,CAAA;AAEvE,OAAO,KAAK,EAA4B,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAIxF,2FAA2F;AAC3F,eAAO,MAAM,WAAW,EAAE,UAAsF,CAAA;AAwBhH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAE/D;AA2ED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,mBAAmB,GAAG,UAAU,CAc5F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,mBAAmB,GAAG,UAAU,CAShG"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The refusal of `===` / `!==` over an operand that may be an object or an
3
+ * array (#3774; `spec/js-primitive-semantics.md`, "Decisions" (4), option
4
+ * (b)).
5
+ *
6
+ * JS compares objects and arrays by reference. A template runtime holds a
7
+ * decoded prop as a value (PHP copy-on-write arrays, Go structs, Ruby and
8
+ * Python containers compared by contents), so no runtime can tell two
9
+ * distinct structures with equal contents apart. Every template adapter
10
+ * therefore refuses the comparison with BF101, as the callback evaluator
11
+ * contract already does (`spec/compiler.md`, "ParsedExpr Evaluator
12
+ * Semantics"). A nullish test (`x === null`, `x === undefined`) is not a
13
+ * strict equality and keeps the target's nil test.
14
+ *
15
+ * The primitive plan names the refusal per node (`mode: 'refuse'`), and
16
+ * every emitter spells the runtime's `strict_eq` for it; the error itself
17
+ * is recorded here, once per component, over every template position, each
18
+ * read in its own scope, and over the memo bodies the adapters seed at SSR.
19
+ */
20
+ import type { ComponentIR, CompilerError } from '../types.ts';
21
+ import type { OperandTyping } from './operand-typing.ts';
22
+ /** Where a template adapter records the refusal. */
23
+ export interface NonPrimitiveEqualitySink {
24
+ readonly errors: CompilerError[];
25
+ readonly componentName: string;
26
+ }
27
+ /**
28
+ * Record BF101 for every `===` / `!==` over an operand that may be an
29
+ * object in `ir`'s template positions and memo bodies. One error per
30
+ * comparison text per compile.
31
+ */
32
+ export declare function refuseNonPrimitiveStrictEquality(ir: ComponentIR, typing: OperandTyping, sink: NonPrimitiveEqualitySink): void;
33
+ //# sourceMappingURL=non-primitive-equality.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"non-primitive-equality.d.ts","sourceRoot":"","sources":["../../src/adapters/non-primitive-equality.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAA;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,qBAAqB,CAAA;AAG7E,oDAAoD;AACpD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,CAAA;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAoBD;;;;GAIG;AACH,wBAAgB,gCAAgC,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,wBAAwB,GAAG,IAAI,CAe7H"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Which values are JS numbers, for backends whose own number
3
+ * stringification differs from JS's `Number::toString` (Perl prints
4
+ * `%.15g` and spells the infinities `Inf`), and whose equality operators
5
+ * need the operand's type.
6
+ */
7
+ import type { ParsedExpr } from '../expression-parser.ts';
8
+ import type { StringNameTest } from './parsed-expr-emitter.ts';
9
+ import type { SsrSeedPlan } from '../ssr-seed-plan.ts';
10
+ import type { ComponentIR } from '../types.ts';
11
+ /**
12
+ * Number-typed signals, memos, props and same-file local consts: a strict
13
+ * equality against one of them keeps Perl's numeric `==` / `!=`, where an
14
+ * operand of unknown type goes through the runtime's `strict_eq`
15
+ * (`emitPerlEquality`). `names` holds the bare spellings (a getter, a
16
+ * destructured prop, a const), `props` the caller-facing keys a
17
+ * `props.<key>` member reads. Whether a binding shadows a name is the
18
+ * caller's scope question.
19
+ */
20
+ export declare function collectNumberValueNames(ir: Pick<ComponentIR, 'metadata'>): {
21
+ names: Set<string>;
22
+ props: Set<string>;
23
+ };
24
+ /**
25
+ * Whether an expression yields a JS NUMBER: arithmetic
26
+ * ({@link isNumericArithmeticResult}), a read of a name `isNumberName`
27
+ * accepts — a zero-argument getter call, a `props.<key>` member, or a bare
28
+ * identifier — a number literal that is not a safe integer, or a ternary
29
+ * with such a branch. Backends whose own number
30
+ * stringification differs from JS (Perl spells the infinities `Inf` and
31
+ * prints `%.15g`) route such a value through their `Number::toString`
32
+ * helper wherever JS stringifies it: an output position, or an operand of
33
+ * string concatenation (#3711). Whether a binding shadows the name is
34
+ * `isNumberName`'s scope question.
35
+ */
36
+ export declare function isNumberValuedExpr(expr: ParsedExpr | null | undefined, isStringName: StringNameTest, isNumberName: (n: string, componentProperty?: boolean) => boolean): boolean;
37
+ /**
38
+ * Signals and memos whose in-template seed (a `derived` step of the SSR seed
39
+ * plan) is a JS number by construction: arithmetic, or a read of a
40
+ * number-typed name or of an earlier such seed (an identity memo). Their
41
+ * declared type is often `unknown` (`createMemo(() => count() / 0)` infers
42
+ * none without a checker), so the seed's shape is the evidence (#3711).
43
+ */
44
+ export declare function numberValuedSeedNames(plan: SsrSeedPlan, isStringName: StringNameTest, isNumberName: (n: string, componentProperty?: boolean) => boolean): Set<string>;
45
+ //# sourceMappingURL=number-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-value.d.ts","sourceRoot":"","sources":["../../src/adapters/number-value.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,aAAa,CAAA;AAIxD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAsBrH;AAQD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,EACnC,YAAY,EAAE,cAAc,EAC5B,YAAY,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,OAAO,KAAK,OAAO,GAChE,OAAO,CAgBT;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,cAAc,EAC5B,YAAY,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,OAAO,KAAK,OAAO,GAChE,GAAG,CAAC,MAAM,CAAC,CASb"}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Operand typing for the JS primitive plan (`spec/js-primitive-semantics.md`,
3
+ * "Decision point"). One `collectOperandTyping` per component reads the
4
+ * Phase-1 metadata (props with their optionality and declared types, signals,
5
+ * memos, local constants, named types) into the facts a name read proves;
6
+ * `typing.at(scope)` sees it through a `BindingScope`, so a loop or callback
7
+ * binding shadows an outer name and a row read takes its type from
8
+ * `ScopeBinding.row` (as `BindingScope.isStringValueName` does for strings).
9
+ *
10
+ * This module only answers "what does a read of this name prove". The
11
+ * expression-level classifier is `operandFacts` (`primitive-plan.ts`).
12
+ */
13
+ import type { IRMetadata } from '../types.ts';
14
+ import { BindingScope, type LoopValueType, type NamedTypeFields } from '../scope/binding-scope.ts';
15
+ /** A JS type an operand can have at its read; `unknown` when not proven. */
16
+ export type OperandType = 'number' | 'string' | 'boolean' | 'nil' | 'object' | 'unknown';
17
+ /** Which JS value a host nil stands for at a read. */
18
+ export type NilReading = 'null' | 'undefined' | 'either';
19
+ /** What Phase-1 types prove about an operand at its read. */
20
+ export interface OperandFacts {
21
+ /** The JS types the value can have; `unknown` when not proven. */
22
+ readonly types: ReadonlySet<OperandType>;
23
+ /** Which JS value a nil stands for, when `types` has `nil`. */
24
+ readonly nil?: NilReading;
25
+ /** A non-negative integer (a loop index binding). */
26
+ readonly index?: boolean;
27
+ /**
28
+ * The value is an array. Not in the design note's sketch: the `get` plan's
29
+ * `array-index` proof needs the receiver proven an array, and `object`
30
+ * alone does not tell an array from a record.
31
+ */
32
+ readonly array?: boolean;
33
+ /**
34
+ * What an element proves when the value is or may be an array and the
35
+ * declared element type or the array-literal seed says (#3824 step 8:
36
+ * `===` refuses an element read that may be an object). A union keeps it
37
+ * from any member that has it (`rows?: Row[]` is `Row[]` or nil), so it is
38
+ * possible-object evidence only and never proves the value an array:
39
+ * `array` does that. Read only by `mayHoldObject`; no plan reads it.
40
+ */
41
+ readonly element?: OperandFacts;
42
+ /**
43
+ * When `types` has `object` only because of named type references (a
44
+ * declared `Row` or `Tone`, which Phase 1 types as `interface` whatever
45
+ * the name resolves to): those names. Absent when a structural object
46
+ * type or literal contributed `object`. Read only by `mayHoldObject`
47
+ * (#3824 step 8), which resolves the names against the component's type
48
+ * definitions: `type Tone = 'warm' | 'cool'` is not an object.
49
+ */
50
+ readonly namedObjects?: readonly string[];
51
+ }
52
+ /** Facts proving nothing. */
53
+ export declare const UNKNOWN_FACTS: OperandFacts;
54
+ /** Facts of a value of exactly one JS type (never nil). */
55
+ export declare function factsOf(type: Exclude<OperandType, 'nil' | 'unknown'>): OperandFacts;
56
+ /** Facts of a nil read as `reading`. */
57
+ export declare function nilFacts(reading: Exclude<NilReading, 'either'>): OperandFacts;
58
+ /**
59
+ * The facts of a value that is one of `a` or `b`. An unknown member makes the
60
+ * whole value unknown; `index` and `array` hold only when both hold, while
61
+ * `element` is kept from either member ({@link mergeElement}).
62
+ */
63
+ export declare function unionFacts(a: OperandFacts, b: OperandFacts): OperandFacts;
64
+ /** `facts` with the nil member removed (the value after a `??`). */
65
+ export declare function withoutNil(facts: OperandFacts): OperandFacts;
66
+ /** `facts` that may also be nil read as `reading`. */
67
+ export declare function withNil(facts: OperandFacts, reading: Exclude<NilReading, 'either'>): OperandFacts;
68
+ /** Whether `facts` prove exactly the one type `type`, never nil. */
69
+ export declare function isExactly(facts: OperandFacts, type: OperandType): boolean;
70
+ /** The one primitive type `facts` prove (never nil), or null. */
71
+ export declare function provenPrimitive(facts: OperandFacts): 'number' | 'string' | 'boolean' | null;
72
+ /** Whether `facts` prove the value is never nil. */
73
+ export declare function isNeverNil(facts: OperandFacts): boolean;
74
+ /** The facts of a declared type (a `TypeInfo`, or the structural `LoopValueType` a row carries). */
75
+ export declare function factsOfType(type: LoopValueType | null | undefined): OperandFacts;
76
+ /** The component-level operand typing, built once per component. */
77
+ export interface OperandTyping {
78
+ /** This typing seen through `scope`. */
79
+ at(scope: BindingScope): ScopedOperandTyping;
80
+ }
81
+ /**
82
+ * {@link OperandTyping} at one emission site. Every answer respects the
83
+ * nearest binding: a loop row, a callback param or a preamble local shadows
84
+ * an outer name.
85
+ */
86
+ export interface ScopedOperandTyping {
87
+ readonly scope: BindingScope;
88
+ /** A bare-name read: an identifier, or a zero-argument getter call. */
89
+ name(name: string): OperandFacts;
90
+ /** The literal `props.<key>` read. */
91
+ prop(key: string): OperandFacts;
92
+ /** The member chain `root.<path…>` (`row.id`); `name(root)` for an empty path. */
93
+ path(root: string, path: readonly string[]): OperandFacts;
94
+ /**
95
+ * This typing inside a callback whose `params` bind (`BindingScope.enterCallback`):
96
+ * each param shadows an outer name and proves nothing itself.
97
+ */
98
+ enterCallback(params: readonly string[]): ScopedOperandTyping;
99
+ }
100
+ export interface OperandTypingOptions {
101
+ /** The fields of a named type, for a row read through a named element type. */
102
+ readonly namedFields?: NamedTypeFields;
103
+ }
104
+ type TypingMetadata = Pick<IRMetadata, 'signals' | 'memos' | 'propsParams' | 'localConstants' | 'propsObjectName' | 'typeDefinitions'>;
105
+ /**
106
+ * Build the component's {@link OperandTyping} from its metadata. Bare names
107
+ * hold signal getters, memos, local constants and (only when the props are
108
+ * destructured) the props; `props.<key>` reads hold the props by their
109
+ * caller-facing key. A later source shadows an earlier one of the same name,
110
+ * so a local constant shadows a destructured prop.
111
+ *
112
+ * Unlike `collectNumberValueNames` and the adapters' `collectStringValueNames`,
113
+ * an optional prop without a default is not proven its declared type: an
114
+ * omitted prop reads nil (`undefined`).
115
+ */
116
+ export declare function collectOperandTyping(metadata: TypingMetadata, options?: OperandTypingOptions): OperandTyping;
117
+ /** An {@link OperandTyping} proving nothing about any outer name; loop bindings still type. */
118
+ export declare const EMPTY_OPERAND_TYPING: OperandTyping;
119
+ /**
120
+ * An {@link OperandTyping}-shaped view over name tests, for the legacy
121
+ * classifiers that take a callback instead of a typing (`isBooleanResultParsed`'s
122
+ * `isBooleanName`). A name the test accepts is proven `type`; nothing else is.
123
+ */
124
+ export declare function typingFromNameTest(type: 'boolean' | 'string' | 'number', test: ((name: string, componentProperty?: boolean) => boolean) | undefined): ScopedOperandTyping;
125
+ export {};
126
+ //# sourceMappingURL=operand-typing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operand-typing.d.ts","sourceRoot":"","sources":["../../src/adapters/operand-typing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,aAAa,CAAA;AAEvD,OAAO,EACL,YAAY,EAGZ,KAAK,aAAa,EAClB,KAAK,eAAe,EAErB,MAAM,2BAA2B,CAAA;AAElC,4EAA4E;AAC5E,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExF,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAA;AAExD,6DAA6D;AAC7D,MAAM,WAAW,YAAY;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;IACxC,+DAA+D;IAC/D,QAAQ,CAAC,GAAG,CAAC,EAAE,UAAU,CAAA;IACzB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAA;IAC/B;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC1C;AAED,6BAA6B;AAC7B,eAAO,MAAM,aAAa,EAAE,YAA2D,CAAA;AAEvF,2DAA2D;AAC3D,wBAAgB,OAAO,CAAC,IAAI,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/B,kFAAkF;IAClF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,CAAA;IACzD;;;OAGG;IACH,aAAa,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,mBAAmB,CAAA;CAC9D;AAED,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAA;CACvC;AAED,KAAK,cAAc,GAAG,IAAI,CACxB,UAAU,EACV,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,CAC/F,CAAA;AAyJD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,GAAE,oBAAyB,GAAG,aAAa,CAehH;AAED,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,EAAE,aAElC,CAAA;AAyCD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,EACrC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,SAAS,GACzE,mBAAmB,CAUrB"}
@@ -34,6 +34,7 @@
34
34
  */
35
35
  import type { ParsedExpr, FlatDepth, TemplatePart, ObjectLiteralProperty } from '../expression-parser.ts';
36
36
  import type { LoweringMatcher, LoweringNode } from '../lowering-registry.ts';
37
+ import { type PrimitiveInputs, type PrimitivePlan } from './primitive-plan.ts';
37
38
  export type HigherOrderMethod = 'filter' | 'every' | 'some' | 'find' | 'findIndex' | 'findLast' | 'findLastIndex';
38
39
  /**
39
40
  * Non-higher-order array methods (#1443). One discriminator for the
@@ -84,19 +85,47 @@ export interface LoweringEmitter {
84
85
  * the emitter can inspect their kinds before deciding how to lower
85
86
  * them, plus an `emit` callback to recurse on any child it wants the
86
87
  * default rendering for.
88
+ *
89
+ * The primitive operations (`binary`, `unary`, `logical`, a `conditional`'s
90
+ * test, `indexAccess`, a computed `member`, a number `literal`) also receive
91
+ * their {@link PrimitivePlan} as the last parameter (#3824,
92
+ * `spec/js-primitive-semantics.md` "How it reaches emitters"): native or
93
+ * helper, decided once by `planPrimitive` from the emitter's
94
+ * {@link ParsedExprEmitter.primitives}. `null` for a node that is not a
95
+ * primitive operation (a non-number literal, a non-computed member, loose
96
+ * `==`, …). Step 0: every emitter accepts the plan and keeps its own
97
+ * spelling; the rollout makes each one spell the plan.
87
98
  */
88
99
  export interface ParsedExprEmitter {
100
+ /**
101
+ * The inputs `planPrimitive` reads for this emitter: the operand typing at
102
+ * the emission site (the component's `collectOperandTyping` through the
103
+ * current `BindingScope`) and the target's `NativeSafeTable`.
104
+ */
105
+ readonly primitives: PrimitiveInputs;
89
106
  identifier(name: string): string;
90
- literal(value: string | number | boolean | null, literalType: LiteralType): string;
107
+ literal(value: string | number | boolean | null, literalType: LiteralType, plan: PrimitivePlan | null): string;
91
108
  call(callee: ParsedExpr, args: ParsedExpr[], emit: (e: ParsedExpr) => string): string;
92
109
  lowering?: LoweringEmitter;
93
- member(object: ParsedExpr, property: string, computed: boolean, optional: boolean, emit: (e: ParsedExpr) => string): string;
94
- indexAccess(object: ParsedExpr, index: ParsedExpr, emit: (e: ParsedExpr) => string): string;
95
- binary(op: string, left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string): string;
96
- unary(op: string, argument: ParsedExpr, emit: (e: ParsedExpr) => string): string;
97
- logical(op: '&&' | '||' | '??', left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string): string;
98
- conditional(test: ParsedExpr, consequent: ParsedExpr, alternate: ParsedExpr, emit: (e: ParsedExpr) => string): string;
99
- templateLiteral(parts: TemplatePart[], emit: (e: ParsedExpr) => string): string;
110
+ /**
111
+ * Spell a boolean-value plan (#3824 step 5): materialize `rendered`, a
112
+ * boolean whose value leaves the expression, as the host's boolean.
113
+ * {@link emitParsedValue} calls it only for a `helper` plan, so a target
114
+ * whose `NativeSafeTable` claims `boolean-value` never needs it.
115
+ */
116
+ booleanValue?(rendered: string, plan: PrimitivePlan): string;
117
+ member(object: ParsedExpr, property: string, computed: boolean, optional: boolean, emit: (e: ParsedExpr) => string, plan: PrimitivePlan | null): string;
118
+ indexAccess(object: ParsedExpr, index: ParsedExpr, emit: (e: ParsedExpr) => string, plan: PrimitivePlan | null): string;
119
+ binary(op: string, left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string, plan: PrimitivePlan | null): string;
120
+ unary(op: string, argument: ParsedExpr, emit: (e: ParsedExpr) => string, plan: PrimitivePlan | null): string;
121
+ logical(op: '&&' | '||' | '??', left: ParsedExpr, right: ParsedExpr, emit: (e: ParsedExpr) => string, plan: PrimitivePlan | null): string;
122
+ conditional(test: ParsedExpr, consequent: ParsedExpr, alternate: ParsedExpr, emit: (e: ParsedExpr) => string, plan: PrimitivePlan | null): string;
123
+ /**
124
+ * `plans[i]` is the ToString plan of `parts[i]` (`planToString`, #3824
125
+ * step 4) for an expression part, null for a string part: the part as it
126
+ * is when native, through the runtime's `to_string` otherwise.
127
+ */
128
+ templateLiteral(parts: TemplatePart[], emit: (e: ParsedExpr) => string, plans: readonly (PrimitivePlan | null)[]): string;
100
129
  callbackMethod(method: string, object: ParsedExpr, arrow: Extract<ParsedExpr, {
101
130
  kind: 'arrow';
102
131
  }>, restArgs: ParsedExpr[], emit: (e: ParsedExpr) => string): string;
@@ -110,6 +139,12 @@ export interface ParsedExprEmitter {
110
139
  }, emit: (e: ParsedExpr) => string): string;
111
140
  unsupported(raw: string, reason: string): string;
112
141
  }
142
+ /**
143
+ * The adapter's string typing of a name at the emission site (its
144
+ * `BindingScope`): `componentProperty` when the read is `props.<name>`,
145
+ * `path` when it is the member chain `name.<path…>` (`row.id`).
146
+ */
147
+ export type StringNameTest = (name: string, componentProperty?: boolean, path?: readonly string[]) => boolean;
113
148
  /**
114
149
  * Whether an operand is string-typed, as far as the ParsedExpr tree can
115
150
  * tell: a string literal, a template literal, a zero-arg getter call /
@@ -122,7 +157,7 @@ export interface ParsedExprEmitter {
122
157
  * Consumed by `===`/`!==` lowering on backends whose `==` is numeric
123
158
  * (Perl `eq`/`ne`) and by `isStringConcatBinary` below.
124
159
  */
125
- export declare function isStringTypedOperand(expr: ParsedExpr, isStringName: (n: string, componentProperty?: boolean) => boolean): boolean;
160
+ export declare function isStringTypedOperand(expr: ParsedExpr, isStringName: StringNameTest): boolean;
126
161
  /**
127
162
  * Whether a `binary` node is JS STRING concatenation rather than numeric
128
163
  * addition: `+` with at least one string-typed operand (#2176). JS `+`
@@ -133,7 +168,7 @@ export declare function isStringTypedOperand(expr: ParsedExpr, isStringName: (n:
133
168
  * decision is shared-layer semantics; each adapter only maps true to
134
169
  * its own operator.
135
170
  */
136
- export declare function isStringConcatBinary(op: string, left: ParsedExpr, right: ParsedExpr, isStringName: (n: string, componentProperty?: boolean) => boolean): boolean;
171
+ export declare function isStringConcatBinary(op: string, left: ParsedExpr, right: ParsedExpr, isStringName: StringNameTest): boolean;
137
172
  /**
138
173
  * Whether a top-level expression yields a JS NUMBER from arithmetic: a
139
174
  * `-` / `*` / `/` / `%` binary, a `+` that is not string concatenation, or
@@ -141,7 +176,7 @@ export declare function isStringConcatBinary(op: string, left: ParsedExpr, right
141
176
  * language's own number stringification (Perl's `%.15g`) route such a
142
177
  * result through their JS `Number::toString` helper instead (#3380).
143
178
  */
144
- export declare function isNumericArithmeticResult(expr: ParsedExpr | null | undefined, isStringName: (n: string, componentProperty?: boolean) => boolean): boolean;
179
+ export declare function isNumericArithmeticResult(expr: ParsedExpr | null | undefined, isStringName: StringNameTest): boolean;
145
180
  /** A runtime helper of the template-helper catalogue (`spec/template-helpers.md`)
146
181
  * that a binary arithmetic operator lowers to. */
147
182
  export type ArithmeticHelper = 'mod' | 'div';
@@ -223,6 +258,11 @@ export declare function groupObjectLiteralSegments(properties: readonly ObjectLi
223
258
  * are not this shape.
224
259
  */
225
260
  export declare function asToStringCall(expr: ParsedExpr): ParsedExpr | null;
261
+ /**
262
+ * The plan `emitParsedExpr` hands an emitter method for `expr`: decided by
263
+ * `planPrimitive` from the emitter's own typing and native-safe table.
264
+ */
265
+ export declare function primitivePlanFor(expr: ParsedExpr, emitter: Pick<ParsedExprEmitter, 'primitives'>): PrimitivePlan | null;
226
266
  /**
227
267
  * Single point of dispatch from `ParsedExpr.kind` to the adapter's
228
268
  * method. Adapters call this once at their entry point; the recursion
@@ -232,5 +272,23 @@ export declare function asToStringCall(expr: ParsedExpr): ParsedExpr | null;
232
272
  * a TS compile error here — and, transitively, in every adapter that
233
273
  * hasn't extended its `ParsedExprEmitter` implementation.
234
274
  */
235
- export declare function emitParsedExpr(expr: ParsedExpr, emitter: ParsedExprEmitter): string;
275
+ export declare function emitParsedExpr(expr: ParsedExpr, emitter: ParsedExprEmitter, sites?: ReadonlyMap<ParsedExpr, PrimitivePlan>): string;
276
+ /**
277
+ * {@link emitParsedExpr} for `expr` read as a value that leaves the
278
+ * expression (a child prop, a stored seed, a `JSON.stringify` argument, a
279
+ * displayed text child): every boolean its value can be is spelled through
280
+ * the boolean-value plan `booleanValueSites` decides (#3824 step 5).
281
+ */
282
+ export declare function emitParsedValue(expr: ParsedExpr, emitter: ParsedExprEmitter): string;
283
+ /**
284
+ * The ToString plans of a template literal's parts, for
285
+ * {@link ParsedExprEmitter.templateLiteral}: null for a string part.
286
+ */
287
+ export declare function templatePartPlans(parts: readonly TemplatePart[], emitter: Pick<ParsedExprEmitter, 'primitives'>): (PrimitivePlan | null)[];
288
+ /**
289
+ * `expr` with the nil-reading rewrite applied to its own operands
290
+ * (`rewriteNilReadings`, #3824 step 4), in the emitter's scope. Only the
291
+ * kinds whose coercion the rewrite reads take the typing.
292
+ */
293
+ export declare function withNilReadings(expr: ParsedExpr, emitter: Pick<ParsedExprEmitter, 'primitives'>): ParsedExpr;
236
294
  //# sourceMappingURL=parsed-expr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