### File

`src/question/check.ts`

### Extends

`Question`

### Constructor

`constructor(name: string, description: string, dependencies: [], type: string, answer: boolean, validations: [], _defaultOption: boolean)`
Defined in src/question/check.ts:16

### Methods

Public fromJson
`fromJson(question: Check)`
Defined in src/question/check.ts:6
Returns : `Check`

### Properties

Public defaultOption
`defaultOption: `boolean``
Type : `boolean`
Defined in src/question/check.ts:30

    import { Dependency, Question } from '.';
    import { Validation } from '../validation';

    export class Check extends Question<boolean> {

      public static fromJson(question: Check): Check {
        return new Check(
          question.name,
          question.description,
          question.dependencies,
          question.type,
          'true' === String(question.answer),
          question.validations,
          'true' === String(question.defaultOption)
        );
      }

      public constructor(
        name: string,
        description: string,
        dependencies: Dependency[],
        type: string,
        answer: boolean = false,
        validations: Validation[] = [],
        private _defaultOption: boolean = null
      ) {
        super(name, description, dependencies || [], type, answer || false, validations || []);
      }

      public get defaultOption(): boolean {
        return this._defaultOption;
      }
    }

# results matching ""

# No results matching ""