graphql-codegen-flutter-freezed
Version:
A stand-alone package to generate Freezed models from GraphQL schema based on the flutter-freezed plugin for GraphQL Code Generator
39 lines (38 loc) • 1.54 kB
TypeScript
import { FreezedParameterBlock } from './parameter-block';
import { FreezedPluginConfig } from '../config';
import { NodeType } from '../utils';
export declare class FreezedFactoryBlock {
private _config;
private _node;
/** document the constructor */
_comment: string;
/** a list of decorators to copy paste to the generator */
_decorators: string[];
/** the key of the original type name */
_key: string | undefined;
/** the name of the class */
_name: string | undefined;
/** the namedConstructor is used for GraphQL Union types or if mergeInput is true */
_namedConstructor: string | undefined;
/** a list of interfaces to implements */
/** a list of class to mixin with */
/** the parameters of this factory constructor */
_parameters: FreezedParameterBlock[];
/** 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: FreezedPluginConfig, _node: NodeType);
init(): FreezedFactoryBlock;
private setComment;
setDecorators(appliesOn: string, nodeName: string): FreezedFactoryBlock;
setKey(key: string): FreezedFactoryBlock;
setName(name: string): FreezedFactoryBlock;
setNamedConstructor(namedConstructor: string | undefined): FreezedFactoryBlock;
private setParameters;
private setShape;
private setBlock;
/** returns the block */
toString(): string;
}