How do I export a variable in typescript?

Đinh Yến

New member
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.
 

Tìm kiếm

Back
Top