@ttsc/wasm 0.30.4 → 0.31.1

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 (174) hide show
  1. package/README.md +3 -3
  2. package/build/build-wasm.cjs +5 -4
  3. package/build/go-build-cache.cjs +347 -0
  4. package/build/pack-prepare.cjs +3 -2
  5. package/cmd/ttsc-wasm/main.go +22 -10
  6. package/cmd/ttsc-wasm/main_wasm.go +2 -2
  7. package/dist/.ttsc-wasm-build.json +138 -58
  8. package/dist/go.mod +7 -5
  9. package/dist/ttsc.wasm +2 -2
  10. package/go.mod +7 -5
  11. package/go.sum +10 -10
  12. package/host/api.go +34 -41
  13. package/host/doc.go +7 -6
  14. package/host/expose.go +42 -0
  15. package/host/fountain.go +192 -22
  16. package/host/host.go +10 -25
  17. package/host/host_native.go +3 -5
  18. package/host/invoke.go +133 -0
  19. package/host/plugin.go +37 -72
  20. package/host/result.go +108 -0
  21. package/lib/src/BootTtscWorkerTerminationError.d.ts +20 -0
  22. package/lib/src/BootTtscWorkerTerminationError.js +20 -0
  23. package/lib/src/BootTtscWorkerTerminationError.js.map +1 -1
  24. package/lib/src/MemFSError.d.ts +21 -2
  25. package/lib/src/MemFSError.js +25 -2
  26. package/lib/src/MemFSError.js.map +1 -1
  27. package/lib/src/bootTtsc.d.ts +49 -2
  28. package/lib/src/bootTtsc.js +89 -23
  29. package/lib/src/bootTtsc.js.map +1 -1
  30. package/lib/src/createMemFS.d.ts +45 -0
  31. package/lib/src/createMemFS.js +269 -66
  32. package/lib/src/createMemFS.js.map +1 -1
  33. package/lib/src/parseResult.d.ts +19 -0
  34. package/lib/src/parseResult.js +19 -0
  35. package/lib/src/parseResult.js.map +1 -1
  36. package/lib/src/structures/IBootResult.d.ts +20 -2
  37. package/lib/src/structures/IBootTtscOptions.d.ts +28 -6
  38. package/lib/src/structures/IFileStats.d.ts +51 -0
  39. package/lib/src/structures/IMemFSHost.d.ts +89 -0
  40. package/lib/src/structures/ITtscApi.d.ts +154 -9
  41. package/lib/src/structures/ITtscBuildOpts.d.ts +18 -1
  42. package/lib/src/structures/ITtscCompileResult.d.ts +20 -2
  43. package/lib/src/structures/ITtscDiagnostic.d.ts +25 -1
  44. package/lib/src/structures/ITtscFileQuery.d.ts +19 -1
  45. package/lib/src/structures/ITtscFountainDiagnosticsResult.d.ts +20 -1
  46. package/lib/src/structures/ITtscNodeAtPositionResult.d.ts +18 -1
  47. package/lib/src/structures/ITtscNodeInfo.d.ts +23 -2
  48. package/lib/src/structures/ITtscPluginOpts.d.ts +24 -3
  49. package/lib/src/structures/ITtscPositionQuery.d.ts +21 -4
  50. package/lib/src/structures/ITtscReleaseSnapshotResult.d.ts +22 -2
  51. package/lib/src/structures/ITtscResult.d.ts +31 -5
  52. package/lib/src/structures/ITtscSnapshotHandle.d.ts +19 -1
  53. package/lib/src/structures/ITtscSnapshotResult.d.ts +22 -1
  54. package/lib/src/structures/ITtscSnapshotsResult.d.ts +19 -1
  55. package/lib/src/structures/ITtscSourceFileTextResult.d.ts +19 -1
  56. package/lib/src/structures/ITtscSourceFilesResult.d.ts +23 -2
  57. package/lib/src/structures/ITtscSymbolAtPositionResult.d.ts +18 -1
  58. package/lib/src/structures/ITtscSymbolDeclaration.d.ts +25 -2
  59. package/lib/src/structures/ITtscSymbolInfo.d.ts +19 -1
  60. package/lib/src/structures/ITtscTransformResult.d.ts +21 -3
  61. package/lib/src/structures/ITtscTypeAtPositionResult.d.ts +18 -1
  62. package/lib/src/structures/ITtscTypeInfo.d.ts +19 -1
  63. package/lib/src/structures/ITtscVersion.d.ts +28 -1
  64. package/lib/src/structures/IWasmExecFS.d.ts +310 -0
  65. package/package.json +4 -2
  66. package/shim-vendor/shim/ast/enums_gen.go +4 -2
  67. package/shim-vendor/shim/ast/go.mod +5 -5
  68. package/shim-vendor/shim/ast/go.sum +10 -10
  69. package/shim-vendor/shim/ast/lint.go +1088 -20
  70. package/shim-vendor/shim/ast/parent.go +38 -22
  71. package/shim-vendor/shim/ast/safe_text.go +48 -26
  72. package/shim-vendor/shim/ast/shim.go +1307 -20
  73. package/shim-vendor/shim/ast/test/next_jsdoc_comment_location_reaches_variable_statement_test.go +51 -0
  74. package/shim-vendor/shim/ast/test/node_text_joins_multi_hop_qualified_name_test.go +24 -9
  75. package/shim-vendor/shim/ast/test/node_text_joins_one_hop_qualified_name_test.go +9 -5
  76. package/shim-vendor/shim/ast/test/node_text_returns_empty_for_nil_test.go +13 -5
  77. package/shim-vendor/shim/ast/test/node_text_returns_identifier_text_test.go +12 -5
  78. package/shim-vendor/shim/ast/test/node_text_skips_empty_qualified_left_test.go +35 -5
  79. package/shim-vendor/shim/astnav/go.mod +5 -5
  80. package/shim-vendor/shim/astnav/go.sum +12 -10
  81. package/shim-vendor/shim/astnav/shim.go +9 -0
  82. package/shim-vendor/shim/bundled/go.mod +7 -1
  83. package/shim-vendor/shim/bundled/go.sum +12 -0
  84. package/shim-vendor/shim/checker/enums_gen.go +4 -2
  85. package/shim-vendor/shim/checker/extra-shim.json +6 -0
  86. package/shim-vendor/shim/checker/go.mod +5 -5
  87. package/shim-vendor/shim/checker/go.sum +10 -10
  88. package/shim-vendor/shim/checker/node_builder_fields_gen.go +19 -0
  89. package/shim-vendor/shim/checker/shim.go +827 -114
  90. package/shim-vendor/shim/compiler/emit_sourcemap.go +68 -29
  91. package/shim-vendor/shim/compiler/emitassemble.go +36 -2
  92. package/shim-vendor/shim/compiler/emithook.go +13 -3
  93. package/shim-vendor/shim/compiler/go.mod +5 -5
  94. package/shim-vendor/shim/compiler/go.sum +10 -10
  95. package/shim-vendor/shim/compiler/incremental.go +56 -20
  96. package/shim-vendor/shim/compiler/resolution.go +92 -9
  97. package/shim-vendor/shim/core/enums_gen.go +2 -2
  98. package/shim-vendor/shim/core/go.mod +6 -1
  99. package/shim-vendor/shim/core/go.sum +10 -0
  100. package/shim-vendor/shim/core/modulekind.go +9 -0
  101. package/shim-vendor/shim/core/shim.go +157 -6
  102. package/shim-vendor/shim/diagnosticwriter/go.mod +10 -1
  103. package/shim-vendor/shim/diagnosticwriter/go.sum +20 -0
  104. package/shim-vendor/shim/diagnosticwriter/lint.go +188 -10
  105. package/shim-vendor/shim/diagnosticwriter/shim.go +14 -0
  106. package/shim-vendor/shim/lsp/go.mod +5 -5
  107. package/shim-vendor/shim/lsp/go.sum +10 -10
  108. package/shim-vendor/shim/lsp/shim.go +78 -2
  109. package/shim-vendor/shim/parser/go.mod +10 -1
  110. package/shim-vendor/shim/parser/go.sum +22 -0
  111. package/shim-vendor/shim/printer/emithost.go +46 -1
  112. package/shim-vendor/shim/printer/go.mod +5 -5
  113. package/shim-vendor/shim/printer/go.sum +10 -10
  114. package/shim-vendor/shim/printer/shim.go +114 -7
  115. package/shim-vendor/shim/printer/sourcemap.go +55 -0
  116. package/shim-vendor/shim/scanner/go.mod +10 -1
  117. package/shim-vendor/shim/scanner/go.sum +20 -0
  118. package/shim-vendor/shim/scanner/regexp.go +19 -4
  119. package/shim-vendor/shim/scanner/shim.go +3 -0
  120. package/shim-vendor/shim/stringutil/extra-shim.json +1 -0
  121. package/shim-vendor/shim/stringutil/go.mod +5 -0
  122. package/shim-vendor/shim/stringutil/go.sum +2 -0
  123. package/shim-vendor/shim/stringutil/shim.go +119 -0
  124. package/shim-vendor/shim/transformers/go.mod +5 -5
  125. package/shim-vendor/shim/transformers/go.sum +12 -10
  126. package/shim-vendor/shim/transformers/shim.go +12 -3
  127. package/shim-vendor/shim/tsoptions/command_line_raw.go +44 -0
  128. package/shim-vendor/shim/tsoptions/go.mod +10 -1
  129. package/shim-vendor/shim/tsoptions/go.sum +22 -0
  130. package/shim-vendor/shim/tsoptions/shim.go +1 -1
  131. package/shim-vendor/shim/tspath/go.mod +1 -1
  132. package/shim-vendor/shim/tspath/go.sum +6 -0
  133. package/shim-vendor/shim/vfs/cachedvfs/go.mod +3 -1
  134. package/shim-vendor/shim/vfs/cachedvfs/go.sum +12 -0
  135. package/shim-vendor/shim/vfs/decode.go +26 -0
  136. package/shim-vendor/shim/vfs/decode_test.go +42 -0
  137. package/shim-vendor/shim/vfs/go.mod +7 -1
  138. package/shim-vendor/shim/vfs/go.sum +12 -0
  139. package/shim-vendor/shim/vfs/osvfs/go.mod +7 -1
  140. package/shim-vendor/shim/vfs/osvfs/go.sum +12 -0
  141. package/src/BootTtscWorkerTerminationError.ts +22 -0
  142. package/src/MemFSError.ts +29 -2
  143. package/src/bootTtsc.ts +104 -28
  144. package/src/createMemFS.ts +291 -64
  145. package/src/parseResult.ts +19 -0
  146. package/src/structures/IBootResult.ts +21 -2
  147. package/src/structures/IBootTtscOptions.ts +32 -6
  148. package/src/structures/IFileStats.ts +65 -0
  149. package/src/structures/IMemFSHost.ts +97 -0
  150. package/src/structures/ITtscApi.ts +154 -9
  151. package/src/structures/ITtscBuildOpts.ts +19 -1
  152. package/src/structures/ITtscCompileResult.ts +21 -2
  153. package/src/structures/ITtscDiagnostic.ts +32 -1
  154. package/src/structures/ITtscFileQuery.ts +19 -1
  155. package/src/structures/ITtscFountainDiagnosticsResult.ts +20 -1
  156. package/src/structures/ITtscNodeAtPositionResult.ts +18 -1
  157. package/src/structures/ITtscNodeInfo.ts +27 -2
  158. package/src/structures/ITtscPluginOpts.ts +28 -3
  159. package/src/structures/ITtscPositionQuery.ts +21 -4
  160. package/src/structures/ITtscReleaseSnapshotResult.ts +22 -2
  161. package/src/structures/ITtscResult.ts +34 -5
  162. package/src/structures/ITtscSnapshotHandle.ts +19 -1
  163. package/src/structures/ITtscSnapshotResult.ts +22 -1
  164. package/src/structures/ITtscSnapshotsResult.ts +19 -1
  165. package/src/structures/ITtscSourceFileTextResult.ts +19 -1
  166. package/src/structures/ITtscSourceFilesResult.ts +23 -2
  167. package/src/structures/ITtscSymbolAtPositionResult.ts +18 -1
  168. package/src/structures/ITtscSymbolDeclaration.ts +27 -2
  169. package/src/structures/ITtscSymbolInfo.ts +23 -1
  170. package/src/structures/ITtscTransformResult.ts +22 -3
  171. package/src/structures/ITtscTypeAtPositionResult.ts +18 -1
  172. package/src/structures/ITtscTypeInfo.ts +20 -1
  173. package/src/structures/ITtscVersion.ts +33 -1
  174. package/src/structures/IWasmExecFS.ts +336 -0
@@ -0,0 +1,51 @@
1
+ package ast_test
2
+
3
+ import (
4
+ "testing"
5
+
6
+ shimast "github.com/microsoft/typescript-go/shim/ast"
7
+ )
8
+
9
+ // Verifies JSDoc attachment traversal reaches the first variable's statement.
10
+ //
11
+ // Public linkage alone cannot show that a parent traversal reaches its required
12
+ // endpoint or that later declarations remain outside the shared comment host.
13
+ //
14
+ // 1. Build and parent-link a statement containing two initialized declarations.
15
+ // 2. Traverse the first initializer through its declaration and list to the statement.
16
+ // 3. Require termination at the statement and rejection of the second declaration.
17
+ //
18
+ // @evidence contracts/testing.md#behavioral-verification The real public shim traversal follows factory-built parent links and must return the exact containing statement after all three hops.
19
+ // @evidence contracts/testing.md#independent-expectations Explicitly retained initializer, declaration, list and statement pointers establish each expected endpoint independently of traversal output.
20
+ // @evidence contracts/testing.md#distinguishing-cases First and second declarations distinguish the attachment boundary, while a detached initializer and statement root distinguish nil termination from unbounded ancestry.
21
+ // @evidence contracts/testing.md#execution-ownership The existing shim/ast/test source-unit runner executes the actual AST factory, parent wiring and traversal in one Go process with no filesystem fixture or compiler producer.
22
+ func TestNextJSDocCommentLocationReachesVariableStatement(t *testing.T) {
23
+ factory := shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
24
+ firstInitializer := factory.NewNumericLiteral("1", shimast.TokenFlagsNone)
25
+ secondInitializer := factory.NewNumericLiteral("2", shimast.TokenFlagsNone)
26
+ first := factory.NewVariableDeclaration(factory.NewIdentifier("first"), nil, nil, firstInitializer)
27
+ second := factory.NewVariableDeclaration(factory.NewIdentifier("second"), nil, nil, secondInitializer)
28
+ list := factory.NewVariableDeclarationList(factory.NewNodeList([]*shimast.Node{first, second}), shimast.NodeFlagsConst)
29
+ statement := factory.NewVariableStatement(nil, list)
30
+ shimast.SetParentInChildren(statement)
31
+ node := firstInitializer
32
+ for index, expected := range []*shimast.Node{first, list, statement} {
33
+ node = shimast.GetNextJSDocCommentLocation(node)
34
+ if node != expected {
35
+ t.Fatalf("attachment hop %d = %p, want %p", index+1, node, expected)
36
+ }
37
+ }
38
+ if got := shimast.GetNextJSDocCommentLocation(statement); got != nil {
39
+ t.Fatalf("statement root advanced to %p", got)
40
+ }
41
+ if got := shimast.GetNextJSDocCommentLocation(secondInitializer); got != second {
42
+ t.Fatalf("second initializer host = %p, want its declaration %p", got, second)
43
+ }
44
+ if got := shimast.GetNextJSDocCommentLocation(second); got != nil {
45
+ t.Fatalf("later declaration advanced to shared list %p", got)
46
+ }
47
+ detached := factory.NewNumericLiteral("3", shimast.TokenFlagsNone)
48
+ if got := shimast.GetNextJSDocCommentLocation(detached); got != nil {
49
+ t.Fatalf("detached node advanced to %p", got)
50
+ }
51
+ }
@@ -1,6 +1,7 @@
1
1
  package ast_test
2
2
 
3
3
  import (
4
+ "strings"
4
5
  "testing"
5
6
 
6
7
  shimast "github.com/microsoft/typescript-go/shim/ast"
@@ -9,16 +10,21 @@ import (
9
10
  // TestNodeTextJoinsMultiHopQualifiedName verifies NodeText joins a
10
11
  // multi-hop QualifiedName as "A.B.C".
11
12
  //
12
- // Locks the recursion in the QualifiedName arm. QualifiedName.Left is an
13
- // *EntityName (Identifier OR QualifiedName), so a non-recursive
14
- // implementation would silently drop everything but the final two
15
- // segments — breaking dotted references like
16
- // `IShoppingCoupon.IDirection.Inner` that show up in real-world JSDoc
17
- // and type-argument positions.
13
+ // QualifiedName.Left can itself be qualified. The three distinct components
14
+ // distinguish a full-chain join from dropping or reversing earlier names.
15
+ // A deeper repeated-component chain checks complete output without asserting
16
+ // timing, allocation counts or an implementation-specific traversal strategy.
18
17
  //
19
- // 1. Construct A.B then ((A.B).C) via NewQualifiedName.
20
- // 2. Call NodeText on the outer node.
21
- // 3. Assert the result is "A.B.C".
18
+ // 1. Construct A.B then ((A.B).C) via NewQualifiedName.
19
+ // 2. Call NodeText on the outer node.
20
+ // 3. Assert the result is "A.B.C".
21
+ // 4. Build 2,000 X components followed by Tail and compare the complete text
22
+ // against the independent repeated literal spelling.
23
+ //
24
+ // @evidence contracts/testing.md#behavioral-verification NodeText joins nested factory-built qualified names into A.B.C and preserves every component of a 2,001-name chain.
25
+ // @evidence contracts/testing.md#independent-expectations Literal A.B.C and 2,000 repetitions of X. followed by Tail specify source spelling without using NodeText as an oracle.
26
+ // @evidence contracts/testing.md#distinguishing-cases Distinct A/B/C names expose reversed order or a lost prefix; the deeper chain exposes truncated ancestry. Empty-component controls are owned by TestNodeTextSkipsEmptyQualifiedLeft, and this case does not measure complexity.
27
+ // @evidence contracts/testing.md#execution-ownership The case calls the shim on actual factory nodes in the existing Go shim unit process; no consumer compiler or native host is run.
22
28
  func TestNodeTextJoinsMultiHopQualifiedName(t *testing.T) {
23
29
  factory := shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
24
30
  a := factory.NewIdentifier("A")
@@ -29,4 +35,13 @@ func TestNodeTextJoinsMultiHopQualifiedName(t *testing.T) {
29
35
  if got := shimast.NodeText(abc); got != "A.B.C" {
30
36
  t.Fatalf("NodeText(A.B.C) = %q, want %q", got, "A.B.C")
31
37
  }
38
+
39
+ chain := factory.NewIdentifier("X")
40
+ for i := 1; i < 2000; i++ {
41
+ chain = factory.NewQualifiedName(chain, factory.NewIdentifier("X"))
42
+ }
43
+ chain = factory.NewQualifiedName(chain, factory.NewIdentifier("Tail"))
44
+ if got, want := shimast.NodeText(chain), strings.Repeat("X.", 2000)+"Tail"; got != want {
45
+ t.Fatalf("deep qualified spelling = %q, want %q", got, want)
46
+ }
32
47
  }
@@ -11,15 +11,19 @@ import (
11
11
  //
12
12
  // Locks the QualifiedName arm that upstream lacks: upstream's
13
13
  // (*Node).Text() panics with `Unhandled case in Node.Text:
14
- // *ast.QualifiedName` because the switch has no arm for the Kind. typia's
15
- // metadata_js_doc_parameter_name calls Text() on a JSDoc tag's Name()
16
- // which is a QualifiedName for `@param obj.field description`, so the
17
- // panic surfaces inside the nestia/typia build pipeline. NodeText must
18
- // turn a `Foo.Bar` qualified name into the dotted string.
14
+ // *ast.QualifiedName` because the switch has no arm for the Kind. Dotted
15
+ // JSDoc parameter names motivate this representation, but this factory-only
16
+ // case does not parse a JSDoc tag or execute an integration pipeline. NodeText
17
+ // must turn a `Foo.Bar` qualified name into the dotted string.
19
18
  //
20
19
  // 1. Construct Foo.Bar via NewQualifiedName(Foo, Bar).
21
20
  // 2. Call NodeText on the qualified node.
22
21
  // 3. Assert the result is "Foo.Bar".
22
+ //
23
+ // @evidence contracts/testing.md#behavioral-verification NodeText joins the factory-built Foo.Bar qualified-name kind that lacks an upstream Text arm.
24
+ // @evidence contracts/testing.md#independent-expectations The literal Foo.Bar expectation fixes the separator and both node payloads independently.
25
+ // @evidence contracts/testing.md#distinguishing-cases A real qualified node distinguishes safe shim dispatch from a delegated upstream panic or identifier-only output.
26
+ // @evidence contracts/testing.md#execution-ownership The shim and real AST factory execute in-process; typia and nestia integration remain distinct CI consumers.
23
27
  func TestNodeTextJoinsOneHopQualifiedName(t *testing.T) {
24
28
  factory := shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
25
29
  left := factory.NewIdentifier("Foo")
@@ -8,16 +8,24 @@ import (
8
8
 
9
9
  // TestNodeTextReturnsEmptyForNil verifies NodeText returns "" for a nil node.
10
10
  //
11
- // Locks the nil-guard at the top of NodeText. The helper is a total function
12
- // over *Node — typia's JSDoc parameter-name extractor calls it without
13
- // checking — so a nil-deref here would be a behaviour change for every
14
- // caller. The empty-string contract is the only signal that lets callers
15
- // skip "no parameter name" entries cleanly.
11
+ // Locks the nil guard and distinguishes nil from an identifier payload. This
12
+ // does not establish totality for arbitrary malformed node data or cyclic
13
+ // qualified-name graphs, nor execute a caller's missing-name filtering policy.
16
14
  //
17
15
  // 1. Call NodeText(nil).
18
16
  // 2. Assert the result is "".
17
+ //
18
+ // @evidence contracts/testing.md#behavioral-verification NodeText handles a nil node without dereferencing it and leaves real identifier text available.
19
+ // @evidence contracts/testing.md#independent-expectations Literal empty and Present expectations distinguish absence from a real named node.
20
+ // @evidence contracts/testing.md#distinguishing-cases The nil input tests the nil guard and the identifier positive control rejects an unconditional empty result. Arbitrary malformed nodes and cycles are not exercised.
21
+ // @evidence contracts/testing.md#execution-ownership Both calls use the actual shim in the existing Go unit process without parsing or launching a consumer compiler.
19
22
  func TestNodeTextReturnsEmptyForNil(t *testing.T) {
20
23
  if got := shimast.NodeText(nil); got != "" {
21
24
  t.Fatalf("NodeText(nil) = %q, want %q", got, "")
22
25
  }
26
+
27
+ factory := shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
28
+ if got := shimast.NodeText(factory.NewIdentifier("Present")); got != "Present" {
29
+ t.Fatalf("identifier control = %q", got)
30
+ }
23
31
  }
@@ -9,19 +9,26 @@ import (
9
9
  // TestNodeTextReturnsIdentifierText verifies NodeText returns the
10
10
  // identifier text when the node Kind already has an upstream Text() arm.
11
11
  //
12
- // Covers the delegated branch: for Kinds upstream supports (Identifier,
13
- // StringLiteral, template parts, …), NodeText must forward to the
14
- // upstream method verbatim. Falling back to the source slice would
15
- // return "" for synthesised nodes that have no source range, breaking
16
- // every factory-built tree we hand to the typia metadata factory.
12
+ // Covers the Identifier delegated branch. Falling back to a source slice
13
+ // would lose Foo on a synthesized node without a source range. Other token
14
+ // kinds and downstream metadata consumers are not exercised by this case.
17
15
  //
18
16
  // 1. Construct a synthesised Identifier via NewIdentifier("Foo").
19
17
  // 2. Call NodeText on it.
20
18
  // 3. Assert the result is "Foo".
19
+ //
20
+ // @evidence contracts/testing.md#behavioral-verification NodeText returns the actual identifier payload for synthesized factory nodes without a source range.
21
+ // @evidence contracts/testing.md#independent-expectations Literal Foo and empty expectations fix token text independently of source slicing or another production text helper.
22
+ // @evidence contracts/testing.md#distinguishing-cases Named and empty synthesized identifiers distinguish payload forwarding from a source-range-only implementation or fabricated spelling.
23
+ // @evidence contracts/testing.md#execution-ownership The real factory and shim execute directly in the existing Go shim test process; no source-file or native-host fixture is needed.
21
24
  func TestNodeTextReturnsIdentifierText(t *testing.T) {
22
25
  factory := shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
23
26
  id := factory.NewIdentifier("Foo")
24
27
  if got := shimast.NodeText(id); got != "Foo" {
25
28
  t.Fatalf("NodeText(Identifier) = %q, want %q", got, "Foo")
26
29
  }
30
+
31
+ if got := shimast.NodeText(factory.NewIdentifier("")); got != "" {
32
+ t.Fatalf("empty identifier = %q", got)
33
+ }
27
34
  }
@@ -10,15 +10,19 @@ import (
10
10
  // stray leading "." when the left segment of a QualifiedName resolves
11
11
  // to the empty string.
12
12
  //
13
- // Parser recovery (and synthesised trees) can produce a QualifiedName
14
- // whose Left identifier carries empty text. A naive `left + "." + right`
15
- // concatenation would yield `.Inner`, which downstream code (the typia
16
- // metadata factory uses this as a map key) would treat as a distinct
17
- // parameter name. The arm has to drop the empty segment instead.
13
+ // Synthesized trees can contain empty or absent qualified components. A naive
14
+ // `left + "." + right` concatenation would yield `.Inner` for an empty left
15
+ // component. This factory-only case checks separator omission without parsing
16
+ // recovery input or exercising a downstream metadata map.
18
17
  //
19
18
  // 1. Build a QualifiedName whose Left is an Identifier created with "".
20
19
  // 2. Call NodeText on the qualified node.
21
20
  // 3. Assert the result is the right-hand text with no leading dot.
21
+ //
22
+ // @evidence contracts/testing.md#behavioral-verification NodeText omits separators for empty qualified components and returns empty when both components are empty.
23
+ // @evidence contracts/testing.md#independent-expectations Literal Inner, Outer and empty expectations independently specify each qualified-name recovery result.
24
+ // @evidence contracts/testing.md#distinguishing-cases Empty-left/right/both, nested empty interior/tail, and absent left/right controls distinguish stray separators, lost earlier components and unconditional right-only output.
25
+ // @evidence contracts/testing.md#execution-ownership All qualified nodes are built with the actual factory and passed directly to the shim in one existing Go unit case.
22
26
  func TestNodeTextSkipsEmptyQualifiedLeft(t *testing.T) {
23
27
  factory := shimast.NewNodeFactory(shimast.NodeFactoryHooks{})
24
28
  left := factory.NewIdentifier("")
@@ -27,4 +31,30 @@ func TestNodeTextSkipsEmptyQualifiedLeft(t *testing.T) {
27
31
  if got := shimast.NodeText(qn); got != "Inner" {
28
32
  t.Fatalf("NodeText(<empty>.Inner) = %q, want %q", got, "Inner")
29
33
  }
34
+
35
+ for _, tc := range []struct{ left, right, want string }{{"Outer", "", "Outer"}, {"", "", ""}} {
36
+ node := factory.NewQualifiedName(factory.NewIdentifier(tc.left), factory.NewIdentifier(tc.right))
37
+ if got := shimast.NodeText(node); got != tc.want {
38
+ t.Fatalf("NodeText(%q.%q) = %q, want %q", tc.left, tc.right, got, tc.want)
39
+ }
40
+ }
41
+
42
+ nested := factory.NewQualifiedName(factory.NewIdentifier("Outer"), factory.NewIdentifier(""))
43
+ nested = factory.NewQualifiedName(nested, factory.NewIdentifier("Inner"))
44
+ nested = factory.NewQualifiedName(nested, factory.NewIdentifier(""))
45
+ if got := shimast.NodeText(nested); got != "Outer.Inner" {
46
+ t.Fatalf("nested empty component spelling = %q, want Outer.Inner", got)
47
+ }
48
+ for _, tc := range []struct {
49
+ node *shimast.Node
50
+ want string
51
+ }{
52
+ {factory.NewQualifiedName(nil, factory.NewIdentifier("Inner")), "Inner"},
53
+ {factory.NewQualifiedName(factory.NewIdentifier("Outer"), nil), "Outer"},
54
+ {factory.NewQualifiedName(nil, nil), ""},
55
+ } {
56
+ if got := shimast.NodeText(tc.node); got != tc.want {
57
+ t.Fatalf("absent component spelling = %q, want %q", got, tc.want)
58
+ }
59
+ }
30
60
  }
@@ -2,13 +2,13 @@ module github.com/microsoft/typescript-go/shim/astnav
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
5
+ require github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063
6
6
 
7
7
  require (
8
- github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
8
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 // indirect
9
9
  github.com/klauspost/cpuid/v2 v2.2.10 // indirect
10
10
  github.com/zeebo/xxh3 v1.1.0 // indirect
11
- golang.org/x/sync v0.20.0 // indirect
12
- golang.org/x/sys v0.43.0 // indirect
13
- golang.org/x/text v0.36.0 // indirect
11
+ golang.org/x/sync v0.21.0 // indirect
12
+ golang.org/x/sys v0.46.0 // indirect
13
+ golang.org/x/text v0.38.0 // indirect
14
14
  )
@@ -1,20 +1,22 @@
1
- github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao=
2
- github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
1
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 h1:nxP4pPoyqOAgX8lYDFCfl3DyKeXErCvSvhcyzwGV9CE=
2
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
3
3
  github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
4
4
  github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
5
5
  github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
6
6
  github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
7
- github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 h1:llOMPhKDiQ+UEJiAaQuuWaJOTg5V7tNNTEf9JPWoYSY=
8
- github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157/go.mod h1:m8YA0PMC7ti0GW0RI05D6fEcjQeu98XVS+FWF+VDW2k=
7
+ github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063 h1:UUVrjTrD+7nkVvkJTjxwA5+SaZ5n1uyAffm2zX2gn+o=
8
+ github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063/go.mod h1:s3yhRRZ7nzSZaiKicku520Tj9Mvewr9y2UtrvpwOmDE=
9
+ github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
10
+ github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0=
9
11
  github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
10
12
  github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
11
13
  github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
12
14
  github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
13
- golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
14
- golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
15
- golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
16
- golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
17
- golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
18
- golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
15
+ golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
16
+ golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
17
+ golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
18
+ golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
19
+ golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
20
+ golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
19
21
  gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
20
22
  gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
@@ -11,5 +11,14 @@ import (
11
11
  // position touches no token, it returns the enclosing non-token node instead;
12
12
  // callers that require a token must check ast.IsTokenKind on the result kind.
13
13
  //
14
+ // @evidence contracts/common.md#principled-implementation Linking the pinned traversal preserves its byte-coordinate and enclosing-node fallback semantics; sourceFile must be a real compiler source tree.
15
+ // @evidence contracts/common.md#clear-and-simple-design One direct bridge exposes the existing cursor operation without adding a second AST search or token representation.
16
+ // @evidence contracts/common.md#prohibited-implementation-shortcuts go:linkname is the shim's explicit internal-package bridge; it neither replaces the upstream traversal nor guesses token kinds from source text.
17
+ // @evidence contracts/common.md#meaningful-documentation Native prose warns about the non-token fallback and the caller's classification responsibility, separated from these acknowledgments.
18
+ // @evidenceExclude contracts/performance.md#bound-retention-and-release-resources GetTouchingToken declares a signature only; the implementation owns acquisition and release of resources.
19
+ // @evidenceExclude contracts/performance.md#efficient-algorithms GetTouchingToken declares a signature only; the implementation owns the processing strategy.
20
+ // @evidenceExclude contracts/performance.md#reuse-equivalent-work GetTouchingToken declares a signature only; the implementation owns any shared work.
21
+ // @evidenceExclude contracts/portability.md#os-neutral-implementation GetTouchingToken is a signature without a body here; path and platform behavior belongs to the implementation that supplies it.
22
+ //
14
23
  //go:linkname GetTouchingToken github.com/microsoft/typescript-go/internal/astnav.GetTouchingToken
15
24
  func GetTouchingToken(sourceFile *ast.SourceFile, position int) *ast.Node
@@ -2,4 +2,10 @@ module github.com/microsoft/typescript-go/shim/bundled
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
5
+ require github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063
6
+
7
+ require (
8
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 // indirect
9
+ golang.org/x/sync v0.21.0 // indirect
10
+ golang.org/x/sys v0.46.0 // indirect
11
+ )
@@ -0,0 +1,12 @@
1
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 h1:nxP4pPoyqOAgX8lYDFCfl3DyKeXErCvSvhcyzwGV9CE=
2
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
3
+ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
4
+ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
5
+ github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063 h1:UUVrjTrD+7nkVvkJTjxwA5+SaZ5n1uyAffm2zX2gn+o=
6
+ github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063/go.mod h1:s3yhRRZ7nzSZaiKicku520Tj9Mvewr9y2UtrvpwOmDE=
7
+ golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
8
+ golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
9
+ golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
10
+ golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
11
+ gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
12
+ gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
@@ -2,8 +2,8 @@
2
2
  //
3
3
  // Completes every exposed enum family: re-exports each member not already
4
4
  // re-exported elsewhere in the shim package, so a plugin that can name the
5
- // enum type can name all of its values. Prevents the #230 class (a sibling
6
- // const silently missing). Regenerate after a typescript-go bump with
5
+ // enum type can name all of its values. Prevents a partially re-exported
6
+ // family (a sibling const silently missing). Regenerate after a typescript-go bump with
7
7
  // `pnpm --filter ttsc shim:audit -fix`.
8
8
 
9
9
  package checker
@@ -17,6 +17,7 @@ const (
17
17
  ElementFlagsVariable = innerchecker.ElementFlagsVariable
18
18
  IterationTypeKindNext = innerchecker.IterationTypeKindNext
19
19
  IterationTypeKindReturn = innerchecker.IterationTypeKindReturn
20
+ IterationTypeKindYield = innerchecker.IterationTypeKindYield
20
21
  IterationUseAllowsAsyncIterablesFlag = innerchecker.IterationUseAllowsAsyncIterablesFlag
21
22
  IterationUseAllowsStringInputFlag = innerchecker.IterationUseAllowsStringInputFlag
22
23
  IterationUseAllowsSyncIterablesFlag = innerchecker.IterationUseAllowsSyncIterablesFlag
@@ -25,6 +26,7 @@ const (
25
26
  IterationUseCacheFlags = innerchecker.IterationUseCacheFlags
26
27
  IterationUseDestructuring = innerchecker.IterationUseDestructuring
27
28
  IterationUseDestructuringFlag = innerchecker.IterationUseDestructuringFlag
29
+ IterationUseElement = innerchecker.IterationUseElement
28
30
  IterationUseForAwaitOf = innerchecker.IterationUseForAwaitOf
29
31
  IterationUseForOf = innerchecker.IterationUseForOf
30
32
  IterationUseForOfFlag = innerchecker.IterationUseForOfFlag
@@ -21,11 +21,17 @@
21
21
  ]
22
22
  },
23
23
  "ExtraFields": {
24
+ "NodeBuilder": [
25
+ "impl"
26
+ ],
24
27
  "Type": [
25
28
  "alias"
26
29
  ],
27
30
  "Checker": [
28
31
  "globalRegExpType"
29
32
  ]
33
+ },
34
+ "ExtraFieldFiles": {
35
+ "NodeBuilder": "node_builder_fields_gen.go"
30
36
  }
31
37
  }
@@ -2,13 +2,13 @@ module github.com/microsoft/typescript-go/shim/checker
2
2
 
3
3
  go 1.26
4
4
 
5
- require github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157
5
+ require github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063
6
6
 
7
7
  require (
8
- github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
8
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 // indirect
9
9
  github.com/klauspost/cpuid/v2 v2.2.10 // indirect
10
10
  github.com/zeebo/xxh3 v1.1.0 // indirect
11
- golang.org/x/sync v0.20.0 // indirect
12
- golang.org/x/sys v0.43.0 // indirect
13
- golang.org/x/text v0.36.0 // indirect
11
+ golang.org/x/sync v0.21.0 // indirect
12
+ golang.org/x/sys v0.46.0 // indirect
13
+ golang.org/x/text v0.38.0 // indirect
14
14
  )
@@ -1,22 +1,22 @@
1
- github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao=
2
- github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
1
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 h1:nxP4pPoyqOAgX8lYDFCfl3DyKeXErCvSvhcyzwGV9CE=
2
+ github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
3
3
  github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
4
4
  github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
5
5
  github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
6
6
  github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
7
- github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 h1:llOMPhKDiQ+UEJiAaQuuWaJOTg5V7tNNTEf9JPWoYSY=
8
- github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157/go.mod h1:m8YA0PMC7ti0GW0RI05D6fEcjQeu98XVS+FWF+VDW2k=
7
+ github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063 h1:UUVrjTrD+7nkVvkJTjxwA5+SaZ5n1uyAffm2zX2gn+o=
8
+ github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063/go.mod h1:s3yhRRZ7nzSZaiKicku520Tj9Mvewr9y2UtrvpwOmDE=
9
9
  github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
10
10
  github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0=
11
11
  github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
12
12
  github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
13
13
  github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
14
14
  github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
15
- golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
16
- golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
17
- golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
18
- golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
19
- golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
20
- golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
15
+ golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
16
+ golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
17
+ golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
18
+ golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
19
+ golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
20
+ golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
21
21
  gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
22
22
  gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
@@ -0,0 +1,19 @@
1
+ // Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
2
+
3
+ package checker
4
+
5
+ import (
6
+ checker "github.com/microsoft/typescript-go/internal/checker"
7
+ unsafe "unsafe"
8
+ )
9
+
10
+ type extra_NodeBuilder struct {
11
+ ctxStack []*checker.NodeBuilderContext
12
+ host checker.Host
13
+ impl *checker.NodeBuilderImpl
14
+ verbosity *checker.VerbosityContext
15
+ }
16
+
17
+ func nodeBuilder_impl(value *checker.NodeBuilder) *checker.NodeBuilderImpl {
18
+ return ((*extra_NodeBuilder)(unsafe.Pointer(value))).impl
19
+ }