Skip to content

Commit

Permalink
types and notes
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed May 30, 2024
1 parent b9184d6 commit 731d9d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/parser/src/options/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export interface PgProtoStoreOptions {
enumsSource?: string;
// Node Object Keys, e.g. { ParseResult: ParseResult, ... }
// meant for simpler user cases where wrapped is advanced
// if a field in an object uses Node, it's wrapped
// if a field in an object references a type, e.g. RangeVar, it's flat
wrappedNodeTypeExport?: boolean;
// wrapped types, for building AST
wrapped?: {
Expand Down
3 changes: 2 additions & 1 deletion packages/parser/types/ast/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import * as t from '@babel/types';
import { PgProtoParserOptions } from '../../options';
export declare const generateTypeImports: (types: Type[], source: string, suffix?: string) => t.ImportDeclaration;
export declare const generateAstHelperMethods: (types: Type[]) => t.ExportDefaultDeclaration;
export declare const generateNodeUnionType: (types: Type[]) => t.ExportNamedDeclaration;
export declare const generateNodeUnionType: (options: PgProtoParserOptions, types: Type[]) => t.ExportNamedDeclaration;
export declare const generateNodeUnionTypeObjectKeys: (types: Type[]) => t.ExportNamedDeclaration;
export declare const convertTypeToTsInterface: (type: Type, options: PgProtoParserOptions) => t.ExportNamedDeclaration;
export declare const convertTypeToWrappedTsInterface: (type: Type, options: PgProtoParserOptions) => t.ExportNamedDeclaration;
export declare const generateTypeImportSpecifiers: (types: Type[], options: PgProtoParserOptions) => t.ImportDeclaration;
1 change: 1 addition & 0 deletions packages/parser/types/options/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface PgProtoStoreOptions {
filename?: string;
optionalFields?: boolean;
enumsSource?: string;
wrappedNodeTypeExport?: boolean;
wrapped?: {
enabled?: boolean;
enumsSource?: string;
Expand Down

0 comments on commit 731d9d5

Please sign in to comment.