Typescript Infer Type Of Array In Javascript Example