0

I'm trying to convert the foundation.js file to typescript to use it in my project. I tried using the command

tsc -d foundation.ts --out foundation.js and alternatively tsc -d foundation.d.ts --out foundation.js

I'm getting an error. "error TS5007: Cannot resolve referenced file: 'foundation.ts'."

Anyone solutions for this? or any other alternative to convert a .js to .d.ts file?

1

1 Answer 1

1

There is no need to create your own, there is one already created in the definitely typed repo... https://github.com/borisyankov/DefinitelyTyped/tree/master/foundation

You can get it multiple ways:

  • clone the repo
  • download the repo
  • use tsd *recommended
  • use nuget (if you're using visual studio)
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.