Đ Đinh Yến New member Jan 12, 2022 #1 How do I export a variable in typescript? Answer ts’ and write: export var arr = [1,2,3]; and open another file, let’s say ‘file2. ts’ and access directly to ‘arr’ in file1.
How do I export a variable in typescript? Answer ts’ and write: export var arr = [1,2,3]; and open another file, let’s say ‘file2. ts’ and access directly to ‘arr’ in file1.