{"version":3,"sources":["../../src/schema/typedef.ts"],"sourcesContent":["import Node               from '../parser/nodes/nodes'\r\nimport Definitions        from '../core/definitions'\r\nimport Schema             from './schema'\r\nimport MemberDef          from './types/memberdef'\r\n\r\n/**\r\n * Defines the SchemaValidator interface.\r\n */\r\nexport default interface TypeDef {\r\n\r\n  /**\r\n   * Returns the type this instance is going to handle.\r\n   */\r\n  get type(): string\r\n\r\n  /**\r\n   * Returns the schema for the type this instance is going to handle.\r\n   */\r\n  get schema(): Schema\r\n\r\n  /**\r\n   * Validates and parses the value as per the memberDef and returns the results\r\n   * specifying whether the value adhers to the schema or not!\r\n   */\r\n  parse(node: Node, memberDef: MemberDef, definitions?: Definitions): any\r\n\r\n  /** Load: JS Value → Validated JS Value (optional until all types adopt) */\r\n  load?(value: any, memberDef: MemberDef, definitions?: Definitions): any\r\n\r\n  /** Stringify: Validated JS Value → IO Text (optional until all types adopt)\r\n   *  Returns undefined to signal \"skip this field entirely\" (for missing optional values)\r\n   */\r\n  stringify?(value: any, memberDef: MemberDef, definitions?: Definitions): string | undefined\r\n\r\n  /**\r\n   * Loads the value as per the memberDef and returns the results\r\n   * specifying whether the value adhers to the schema or not!\r\n   */\r\n  // deserialize(data: any, memberDef: MemberDef): any\r\n\r\n  /**\r\n   * Serializes the value as per the memberDef and returns the results\r\n   * specifying whether the value adhers to the schema or not!\r\n   */\r\n  // serialize(data: any, memberDef: MemberDef, isRoot: boolean): string\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}