Skip to content

Commit 6fa2110

Browse files
author
Christoph Bühler
committed
feat(generator): make generators extendable
1 parent c075a66 commit 6fa2110

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/code-generators/TypescriptCodeGenerator.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ import { TypescriptGenerationOptions } from './TypescriptGenerationOptions';
3030
*/
3131
export type Generatable = Declaration | Import | Export | SymbolSpecifier;
3232

33-
type Generators = { [name: string]: (generatable: Generatable, options: TypescriptGenerationOptions) => string };
33+
/**
34+
* Type for generators.
35+
*/
36+
export type Generators = { [name: string]: (generatable: Generatable, options: TypescriptGenerationOptions) => string };
3437

35-
const generators: Generators = {
38+
/**
39+
* Hash with all possible (yet implemented) generators.
40+
*/
41+
export const generators: Generators = {
3642
[SymbolSpecifier.name]: generateSymbolSpecifier,
3743
[MethodDeclaration.name]: generateMethodDeclaration,
3844
[ParameterDeclaration.name]: generateParameterDeclaration,

0 commit comments

Comments
 (0)