@graphql-codegen/flutter-freezed
Version:
GraphQL Code Generator plugin to generate Freezed models from your GraphQL schema
37 lines (36 loc) • 1.38 kB
TypeScript
import { FlutterFreezedPluginConfig } from '../config.js';
import { FreezedFactoryBlockRepository, NodeType } from '../utils.js';
import { FreezedFactoryBlock } from './factory-block.js';
export declare class FreezedDeclarationBlock {
private _config;
private _freezedFactoryBlockRepository;
private _node;
/** document the class */
_comment: string;
/** a list of decorators to copy paste to the generator */
_decorators: string[];
/** the name of the class */
_name: string | undefined;
/** a list of default constructor and named Constructors used create a Freezed union/sealed class */
_factoryBlocks: FreezedFactoryBlock[];
/** the shape is the content of the block */
_shape: string | undefined;
/** the block is the final structure that is generated */
_block: string | undefined;
private _freezedConfigValue;
constructor(_config: FlutterFreezedPluginConfig, _freezedFactoryBlockRepository: FreezedFactoryBlockRepository, _node: NodeType);
init(): FreezedDeclarationBlock;
private setComment;
private getEnumComment;
private setDecorators;
private getFreezedDecorator;
private setName;
private setFactoryBlocks;
private setShape;
/**
* returns the string output of the block
*/
private setBlock;
/** returns the block */
toString(): string;
}