Skip to content
xXAlphaManXx edited this page Jun 24, 2020 · 1 revision

This page contains all the findings made about the TSD Library. These are crude and may contain errors. Contact @smartclash for more details.

What are we trying?

Pass custom config and types path

TSD library accepts only directory. And it also looks for package.json inside the same directory. It then parses the file and sees if there is any one of these fields [types or typings]. If it's available, it will take that as the type definition path. If it doesn't exist, TSD checks if there is index.d.ts in the root folder. But the problem is that the checking all happens inside the test folder and we cannot manually specify.

We cannot integrate TSD into our jest-runner-tsd because we couldn't specify the path to typings file manually. Thus we need to make changes to TSD that allows us to pass custom path to typings as well as maintain the project's own focus in line.

References

Clone this wiki locally