-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This page contains all the findings made about the TSD Library. These are crude and may contain errors. Contact @smartclash for more details.
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.
-
/source/lib/index.ts#L52-L58
- This shows that TSD tries to find
package.json
inside the test directory
- This shows that TSD tries to find
-
/source/lib/index.ts#L15-L17
- This shows that TSD library automatically tries to find typings file(s) inside the test directory