Логическое значение по умолчанию для схемы mon goose не работает. Ошибка машинописи ts (2322) - PullRequest
0 голосов
/ 08 апреля 2020

Я создаю схемы mon goose (v: "^ 5.2.4") с машинописным текстом следующего кода:

fadeAudio: {
   type: Boolean,
   required: false,
   default: true
}

Поле по умолчанию дает эту ошибку:

Type 'true' is not assignable to type 'BooleanConstructor | DefaultFn<BooleanConstructor>'.ts(2322)
index.d.ts(1078, 5): The expected type comes from property 'default' which is declared here on type 'SchemaTypeOpts<BooleanConstructor>'
...