diff --git a/schema.json b/schema.json index 506d989a..608bffe0 100644 --- a/schema.json +++ b/schema.json @@ -5138,7 +5138,7 @@ "yahooFinanceType": "number|null" }, "sellingGeneralAdministrative": { - "yahooFinanceType": "number" + "yahooFinanceType": "number|null" }, "nonRecurring": { "yahooFinanceType": "number|null" diff --git a/src/modules/quoteSummary-iface.ts b/src/modules/quoteSummary-iface.ts index 9c390ed9..fd9903e6 100644 --- a/src/modules/quoteSummary-iface.ts +++ b/src/modules/quoteSummary-iface.ts @@ -513,7 +513,7 @@ export interface IncomeStatementHistoryElement { costOfRevenue: number; grossProfit: number; researchDevelopment: number | null; - sellingGeneralAdministrative: number; + sellingGeneralAdministrative: number | null; nonRecurring: number | null; otherOperatingExpenses: number | null; totalOperatingExpenses: number; diff --git a/src/modules/quoteSummary.spec.ts b/src/modules/quoteSummary.spec.ts index 78d30ab5..49ca508f 100644 --- a/src/modules/quoteSummary.spec.ts +++ b/src/modules/quoteSummary.spec.ts @@ -1,9 +1,16 @@ import quoteSummary, { QuoteSummaryModules } from "./quoteSummary.js"; import { InvalidOptionsError } from "../lib/errors.js"; -import { testSymbols } from "../../tests/symbols.js"; +import { testSymbols as commonTestSymbols } from "../../tests/symbols.js"; import testYf from "../../tests/testYf.js"; +const testSymbols = [ + ...commonTestSymbols, + // incomeStatementHistory/sellingGeneralAdministrative is null (#258) + // "Got {}->null for 'number', did you want 'number | null' ?" + "CMCOM.AS", +]; + const yf = testYf({ quoteSummary }); interface itValidatesOpts {