question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs: why shall we not put the declarations.d.ts on the project root folder

See original GitHub issue

This issue is a documentation details request.

On the Using TypeScript section of the readme, it says about the declarations.d.ts file:

create one if you don’t have one already, but don’t put in the root folder of your project

The question is: Why should I not?

We don’t have any explanation neither source of the reason, and we didn’t find anything on the Internet.

Also, we tried to put the declarations.d.ts file on the root folder of our Expo project and it works fine without visible side effect.

May you please provide some references about that?

Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kristerkaricommented, Aug 23, 2022
0reactions
kristerkaricommented, Aug 23, 2022

Alright, let’s just fix the documentation not to mention it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TSC fails to locate .d.ts files when using "paths" remapping + ...
As you can see when using relative paths It tries to 'target file type' as Typescript and goes through a module resolution path,...
Read more >
Typescript: .d.ts file not recognized - Stack Overflow
We declared "include": ["src"] in our tsconfig.json and this caused declarations.d.ts in root ( "/" ) to not be detected.
Read more >
Documentation - Creating .d.ts Files from .js files - TypeScript
d.ts files in your project, you will need to do up-to four steps: Add TypeScript to your dev dependencies; Add a tsconfig ...
Read more >
A quick introduction to “Type Declaration” files and adding ...
The reason we need to add declare keyword while declaring a namespace is that the declaration files ( .d.ts ) can only contain...
Read more >
Highcharts TypeScript Declarations (beta)
If you place your TypeScript source code ( *.ts ) in one of your project folders, the TypeScript compiler will automatically find it, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found