There are 2 ways to do it:
A) simply make a file at the project root named global.d.ts and list your declare module 'x' statements all in that one file.
declare module 'third-party-library-name'
B)
1: Edit your tsconfig file to use the typeRoots property.
2: Add that root folder to the exclude property in the tsconfig file as well.
3: Add a folder for your third-party library in your types directory.
4: Add an index.d.ts file with your typings into that folder.
5: Add your type definition as declare module 'third-party-library-name'
Reference Links:
How to add custom "typings" in typescript 2.0
https://www.detroitlabs.com/blog/2018/02/28/adding-custom-type-definitions-to-a-third-party-library/
How to install custom typings?