|
1 | | -import type { MonoSchemaParser } from "../src/schema-parser/mono-schema-parser"; |
| 1 | +import type { MonoSchemaParser } from "../src/schema-parser/mono-schema-parser.js"; |
2 | 2 |
|
3 | 3 | type HttpClientType = "axios" | "fetch"; |
4 | 4 |
|
@@ -212,7 +212,7 @@ interface GenerateApiParamsBase { |
212 | 212 | * } |
213 | 213 | * ``` |
214 | 214 | */ |
215 | | - customTranslator?: new () => typeof import("../src/translators/translator").Translator; |
| 215 | + customTranslator?: new () => typeof import("../src/translators/translator.js").Translator; |
216 | 216 | /** fallback name for enum key resolver */ |
217 | 217 | enumKeyResolverName?: string; |
218 | 218 | /** fallback name for type name resolver */ |
@@ -279,7 +279,7 @@ type PrimitiveTypeStructValue = |
279 | 279 | | string |
280 | 280 | | (( |
281 | 281 | schema: Record<string, unknown>, |
282 | | - parser: import("../src/schema-parser/schema-parser").SchemaParser, |
| 282 | + parser: import("../src/schema-parser/schema-parser.js").SchemaParser, |
283 | 283 | ) => string); |
284 | 284 |
|
285 | 285 | type PrimitiveTypeStruct = Record< |
@@ -371,7 +371,7 @@ export interface Hooks { |
371 | 371 | /** Start point of work this tool (after fetching schema) */ |
372 | 372 | onInit?: <C extends GenerateApiConfiguration["config"]>( |
373 | 373 | configuration: C, |
374 | | - codeGenProcess: import("../src/code-gen-process").CodeGenProcess, |
| 374 | + codeGenProcess: import("../src/code-gen-process.js").CodeGenProcess, |
375 | 375 | ) => C | undefined; |
376 | 376 | /** customize configuration object before sending it to ETA templates */ |
377 | 377 | onPrepareConfig?: <C extends GenerateApiConfiguration>( |
@@ -399,7 +399,7 @@ export interface Hooks { |
399 | 399 | ) => string | undefined; |
400 | 400 | } |
401 | 401 |
|
402 | | -export type RouteNameRouteInfo = Record<unknown, unknown>; |
| 402 | +export type RouteNameRouteInfo = Record<string, unknown>; |
403 | 403 |
|
404 | 404 | export type RouteNameInfo = { |
405 | 405 | usage: string; |
@@ -662,11 +662,11 @@ export interface GenerateApiConfiguration { |
662 | 662 | /** do not use constructor args, it can break functionality of this property, just send class reference */ |
663 | 663 | customTranslator?: new ( |
664 | 664 | ...args: never[] |
665 | | - ) => typeof import("../src/translators/translator").Translator; |
| 665 | + ) => typeof import("../src/translators/translator.js").Translator; |
666 | 666 | internalTemplateOptions: { |
667 | 667 | addUtilRequiredKeysType: boolean; |
668 | 668 | }; |
669 | | - componentTypeNameResolver: typeof import("../src/component-type-name-resolver").ComponentTypeNameResolver; |
| 669 | + componentTypeNameResolver: typeof import("../src/component-type-name-resolver.js").ComponentTypeNameResolver; |
670 | 670 | fileNames: { |
671 | 671 | dataContracts: string; |
672 | 672 | routeTypes: string; |
@@ -754,13 +754,13 @@ export interface GenerateApiOutput { |
754 | 754 | path: string; |
755 | 755 | fileName: string; |
756 | 756 | content: string; |
757 | | - withPrefix?: boolean; |
| 757 | + withPrefix: boolean; |
758 | 758 | }) => void; |
759 | 759 | renderTemplate: ( |
760 | 760 | templateContent: string, |
761 | 761 | data: Record<string, unknown>, |
762 | 762 | etaOptions?: Partial<import("eta").EtaConfig>, |
763 | | - ) => string; |
| 763 | + ) => Promise<string> | string; |
764 | 764 | getTemplate: (params: { |
765 | 765 | fileName?: string; |
766 | 766 | name?: string; |
|
0 commit comments