diff --git a/src/custom-functions/bcode.ts b/src/custom-functions/bcode.ts index 79bd1be..6246977 100644 --- a/src/custom-functions/bcode.ts +++ b/src/custom-functions/bcode.ts @@ -9,7 +9,9 @@ export function isV3Call( param1: string | number, param2: string | number ): boolean { - if (typeof param1 === 'number' || typeof param2 === 'number') { + if (param1 == undefined || param2 == undefined) { + throw new Error('引数が正しくありません') + } else if (typeof param1 === 'number' || typeof param2 === 'number') { return false } else if (param1 === '' || param2 === '') { return false diff --git a/src/main.ts b/src/main.ts index 14d9203..0db9b6c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,30 +42,27 @@ global.exportCsv = exportCsv * @param {"net_sales"} propertyName 項目名 * @param {TRUE} isRawValue (オプション) 数値をRAWデータで表示するかどうか (デフォルト値: FALSE) * @param {TRUE} isWithUnits (オプション) 単位を末尾に付加するかどうか (デフォルト値: FALSE) + * @param {TRUE} param5 (オプション) 廃止予定のオプション * @return 指定した銘柄の財務数字または指標 * @customfunction */ global.BCODE = ( ticker, - fiscalYear, - fiscalQuarter, + period, propertyName, isRawValue = false, - isWithUnits = false + isWithUnits = false, + param5 = false ): number | string => { - return bcode( - ticker, - fiscalYear, - fiscalQuarter, - propertyName, - isRawValue, - isWithUnits - ) + return bcode(ticker, period, propertyName, isRawValue, isWithUnits, param5) } /** + * 近日廃止予定です。 + * * 指定した項目の名称を日本語で取得します。 * + * @deprecated 近日廃止予定です * @param {"net_sales"} propertyName 項目名 * @return 指定した項目の名称 * @customfunction @@ -75,8 +72,11 @@ global.BCODE_LABEL = (propertyName: string): string => { } /** + * 近日廃止予定です。 + * * 指定した項目の単位を取得します。 * + * @deprecated 近日廃止予定です * @param {"net_sales"} propertyName 項目名 * @return 指定した項目の単位 * @customfunction