@graphql-codegen/c-sharp-common
Version:
20 lines (19 loc) • 835 B
text/typescript
import { NameNode } from 'graphql';
/**
* @description Configuration for member naming conventions.
*/
export type MemberNameConventionConfig = {
memberNameConvention?: 'camelCase' | 'pascalCase';
};
type MemberNamingFunctionInput = string | NameNode;
/**
* @description Type func signature of a function is responsible for transforming the name of a member (property, method) to a valid C# identifier.
*/
export type MemberNamingFn = (nameOrNameNode: MemberNamingFunctionInput) => string;
/**
* @description Get the member naming function based on the provided configuration.
* @param rawConfig Config to decide which concrete naming function to return. Fallback to camelCase if not provided.
* @returns
*/
export declare function getMemberNamingFunction(rawConfig: MemberNameConventionConfig): MemberNamingFn;
export {};