Skip to content

Commit

Permalink
fix: use generic return type
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed May 8, 2023
1 parent 23d5c27 commit e0ab6d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions workspaces/types/types/generator/generator.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { BaseEnvironment } from '../environment/environment.js';
import type { GeneratorCustomFeatures, GeneratorFeatures } from './generator-features.js';
import type { GeneratorCustomOptions, GeneratorOptions } from './generator-options.js';
import type { GeneratorFeatures } from './generator-features.js';
import type { GeneratorOptions } from './generator-options.js';

export type EnvironmentGenerator = {
readonly env: BaseEnvironment;
Expand Down
4 changes: 2 additions & 2 deletions workspaces/types/types/generator/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export type GetGeneratorOptions<T extends BaseGenerator = BaseGenerator> = T ext
export type GetGeneratorFeatures<T extends BaseGenerator = BaseGenerator> = T extends BaseGenerator<any, infer features> ? features : never;

export type GetGeneratorConstructor<T extends BaseGenerator = BaseGenerator> =
| (new (args: string[], options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) => BaseGenerator)
| (new (options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) => BaseGenerator);
| (new (args: string[], options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) => T)
| (new (options: GetGeneratorOptions<T>, features: GetGeneratorFeatures<T>) => T);

0 comments on commit e0ab6d4

Please sign in to comment.