ng-openapi 0.1.9 → 0.1.11-pr-20-type-generator-performance-dcd6bb3.0

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 (4) hide show
  1. package/cli.cjs +268 -240
  2. package/index.d.ts +9 -19
  3. package/index.js +276 -243
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -166,33 +166,23 @@ declare class SwaggerParser {
166
166
  }
167
167
 
168
168
  /**
169
- * Interface for generator instances
169
+ * Interface for generator class (both constructor and instance)
170
170
  */
171
- interface IPluginGenerator {
171
+ interface IPluginGeneratorClass {
172
172
  /**
173
- * Generate code files
173
+ * Constructor signature
174
174
  */
175
- generate(outputRoot: string): void;
175
+ new (parser: SwaggerParser, project: Project, config: GeneratorConfig): IPluginGenerator;
176
176
  }
177
177
  /**
178
- * Interface for generator constructor with static methods
178
+ * Interface for generator instances
179
179
  */
180
- interface IPluginGeneratorConstructor {
181
- /**
182
- * Create a generator instance
183
- */
184
- create(swaggerPathOrUrl: string, project: Project, config: GeneratorConfig): Promise<IPluginGenerator>;
180
+ interface IPluginGenerator {
185
181
  /**
186
- * Constructor signature
182
+ * Generate code files
187
183
  */
188
- new (parser: SwaggerParser, project: Project, config: GeneratorConfig): IPluginGenerator;
184
+ generate(outputRoot: string): Promise<void>;
189
185
  }
190
- /**
191
- * Combined type that includes both static and instance methods
192
- */
193
- type IPluginGeneratorClass = IPluginGeneratorConstructor & {
194
- prototype: IPluginGenerator;
195
- };
196
186
 
197
187
  interface GeneratorConfig {
198
188
  input: string;
@@ -287,4 +277,4 @@ declare function validateInput(inputPath: string): void;
287
277
  */
288
278
  declare function generateFromConfig(config: GeneratorConfig): Promise<void>;
289
279
 
290
- export { BASE_INTERCEPTOR_HEADER_COMMENT, type EnumValueObject, type GeneratorConfig, type GetMethodGenerationContext, HTTP_RESOURCE_GENERATOR_HEADER_COMMENT, type IPluginGenerator, type IPluginGeneratorClass, type IPluginGeneratorConstructor, MAIN_INDEX_GENERATOR_HEADER_COMMENT, type MethodGenerationContext, type NgOpenapiClientConfig, PROVIDER_GENERATOR_HEADER_COMMENT, type Parameter, type PathInfo, type RequestBody, SERVICE_GENERATOR_HEADER_COMMENT, SERVICE_INDEX_GENERATOR_HEADER_COMMENT, type SwaggerDefinition, SwaggerParser, type SwaggerResponse, type SwaggerSpec, TYPE_GENERATOR_HEADER_COMMENT, type TypeSchema, camelCase, collectUsedTypes, escapeString, extractPaths, generateFromConfig, generateParseRequestTypeParams, getBasePathTokenName, getClientContextTokenName, getRequestBodyType, getResponseType, getResponseTypeFromResponse, getTypeScriptType, hasDuplicateFunctionNames, inferResponseTypeFromContentType, isDataTypeInterface, isPrimitiveType, kebabCase, nullableType, pascalCase, type placeHolder, validateInput };
280
+ export { BASE_INTERCEPTOR_HEADER_COMMENT, type EnumValueObject, type GeneratorConfig, type GetMethodGenerationContext, HTTP_RESOURCE_GENERATOR_HEADER_COMMENT, type IPluginGenerator, type IPluginGeneratorClass, MAIN_INDEX_GENERATOR_HEADER_COMMENT, type MethodGenerationContext, type NgOpenapiClientConfig, PROVIDER_GENERATOR_HEADER_COMMENT, type Parameter, type PathInfo, type RequestBody, SERVICE_GENERATOR_HEADER_COMMENT, SERVICE_INDEX_GENERATOR_HEADER_COMMENT, type SwaggerDefinition, SwaggerParser, type SwaggerResponse, type SwaggerSpec, TYPE_GENERATOR_HEADER_COMMENT, type TypeSchema, camelCase, collectUsedTypes, escapeString, extractPaths, generateFromConfig, generateParseRequestTypeParams, getBasePathTokenName, getClientContextTokenName, getRequestBodyType, getResponseType, getResponseTypeFromResponse, getTypeScriptType, hasDuplicateFunctionNames, inferResponseTypeFromContentType, isDataTypeInterface, isPrimitiveType, kebabCase, nullableType, pascalCase, type placeHolder, validateInput };