File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ type SSEShape = ReturnType<typeof makeEventSchema>["shape"];
1111type Store = Record < IOKind , ts . TypeNode > ;
1212
1313export abstract class IntegrationBase {
14+ /** @internal */
15+ protected readonly api : TypescriptAPI ;
1416 /** @internal */
1517 protected paths = new Set < string > ( ) ;
1618 /** @internal */
@@ -22,10 +24,11 @@ export abstract class IntegrationBase {
2224 > ( ) ;
2325
2426 protected constructor (
25- /** @internal */
26- protected readonly api : TypescriptAPI ,
27+ typescript : typeof ts ,
2728 protected readonly serverUrl : string ,
28- ) { }
29+ ) {
30+ this . api = new TypescriptAPI ( typescript ) ;
31+ }
2932
3033 readonly #ids = {
3134 pathType : "Path" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { loadPeer } from "./peer-helpers";
88import { Routing } from "./routing" ;
99import { OnEndpoint , walkRouting , withHead } from "./routing-walker" ;
1010import { HandlingRules } from "./schema-walker" ;
11- import { TypescriptAPI } from "./typescript-api" ;
1211import { zodToTs } from "./zts" ;
1312import { ZTSContext } from "./zts-helpers" ;
1413import type Prettier from "prettier" ;
@@ -92,7 +91,7 @@ export class Integration extends IntegrationBase {
9291 noContent = z . undefined ( ) ,
9392 hasHeadMethod = true ,
9493 } : IntegrationParams ) {
95- super ( new TypescriptAPI ( typescript ) , serverUrl ) ;
94+ super ( typescript , serverUrl ) ;
9695 const commons = { makeAlias : this . #makeAlias. bind ( this ) , api : this . api } ;
9796 const ctxIn = { brandHandling, ctx : { ...commons , isResponse : false } } ;
9897 const ctxOut = { brandHandling, ctx : { ...commons , isResponse : true } } ;
You can’t perform that action at this time.
0 commit comments