結果 : typescript call function only if defined