I want to use the export
keyword and the import
keyword in order to link my TypeScript files.
TypeScript does not support the configuration "module": "ES6"
with the --outFile
parameter.
My project processes those files one by one so I need this option. Once the TypeScript file is compiled, I pass it to the Closure Compiler jar.
I do not want to use Node.JS or any other libraries. I just want to use native JavaScript but with types.
How can I do ?
Does the /// <reference path="myFile.ts" />
syntax allow me to have a similar approach ? I guess if I use that "annotation", I must use another way to export things ?
If it is possible, I want a future proof solution and I really think that import/export is the future :/ and then no need to rewrite my code later to use import/export...
question from:
https://stackoverflow.com/questions/65921849/how-to-use-imports-in-typescript-without-node-js-nor-external-libraries 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…