結果 : typescript call function if defined