jsona.serialize requires an obligatory includeNames
artem-galas opened this issue · 2 comments
artem-galas commented
Jsona.serialize
requires an obligatory parameter - includeNames
, although it should be optional.
I saw the test cases and I can't understand how they can work successfully.
(Test case)
Here is the code below which causes this issue:
import Jsona from 'jsona/lib/Jsona';
const jsona = new Jsona();
const sessionData = {
type: 'sessions',
name: this.name,
start_date_time: this.start_date_time
};
const sessionDataSerialize = jsona.serialize({stuff: sessionData});
TS2345:Argument of type '{ stuff: { type: string; name: string; start_date_time: Date; }; }' is not assignable to parameter of type '{ stuff: TJsonaModel | TJsonaModel[]; includeNames: string[] | TJsonaNormalizedIncludeNamesTree; }'.
Property 'includeNames' is missing in type '{ stuff: { type: string; name: string; start_date_time: Date; }; }'.
olosegres commented
You're right, this parameter conceived as optional, thanks for your PR!
Released in 1.1.3
artem-galas commented
BTW
I don't understand why tests was passed?