Sometimes, we want to configure custom global interfaces (.d.ts files) for TypeScript.
In this article, we’ll look at how to configure custom global interfaces (.d.ts files) for TypeScript.
How to configure custom global interfaces (.d.ts files) for TypeScript?
To configure custom global interfaces (.d.ts files) for TypeScript, we add our interfaces directly into a .d.ts
file.
For instance, we can add a types.d.ts
file and write
interface Dictionary {}
interface Foo {}
interface Bar {}
to add the Dictionary
, Foo
, and Bar
interfaces into the types.d.ts
global type definition file.
Conclusion
To configure custom global interfaces (.d.ts files) for TypeScript, we add our interfaces directly into a .d.ts
file.