import { IConvertContext , SingularizeState } from "../../IConvertContext" ; import { IConvertSettings } from "../../IConvertSettings" ; import { Util } from "../../Util" ; import { DirectiveNodeHandlerAdapter , IDirectiveContext , IDirectiveNodeHandlerOutput } from "./DirectiveNodeHandlerAdapter" ; /**
 * A handler for plural directives.
 */ export class DirectiveNodeHandlerPlural extends DirectiveNodeHandlerAdapter { constructor ( util , settings ) { super ( 'plural' , util , settings ) ; } public handle ( directiveContext , convertContext ) { if ( this . isDirectiveScopeAll ( directiveContext . directive ) ) { convertContext . singularizeState = SingularizeState . PLURAL ; } delete convertContext . singularizeVariables ! [ this . util . nameToVariable ( directiveContext . fieldLabel , convertContext ) . value ] ; return { } ; } }