Typescript Type Function With Unknown Number Of Parameters In Naive Bayes