How to reference js files in typescript

A js file is referenced in a ts

import jsFile from "./js/jsFile"

within this jsFile, the syntax of es6 is used again

// jsFile
import other from "./other.js"
export default other

then I reported an error, saying that the unexpected token import, in jsFile is about as follows. I hope to solve the whole packaging process.
at present, it is packaged using tsc index.ts. Should I add a layer to convert the es6 of js to es5, and then quote it?

[picture]
clipboard.png

Oct.09,2021

indicates that your running environment does not support import, and ts will not move the


ts of the js file you cited cannot interact directly with js. Use external declaration to describe the type information of the js code before you can import the js file. The landlord has not yet mastered the essence of ts. I have recently signed up a TypeScript tutorial. Work with heart. Welcome to watch TypeScript crash course

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ef16-2c46d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ef16-2c46d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?