1

I have a JavaScript file that contains some functions, I want to import those functions in a ts file, I have tried using the technique below but it didn't work

import * as downloadExport from "./leaflet_export";

It raises the following error:

enter image description here

Any ideas about how to import functions from a js file into ts file??

1 Answer 1

2

See documentation here: https://www.typescriptlang.org/docs/handbook/compiler-options.html

--allowJs boolean false(defacult value) Allow JavaScript files to be compiled.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.