Check out example codes for ".d.ts vs .ts". It will help you in understanding the concepts better.
Code Example 1
*.ts
function displayMessage(message) {
alert(message);
}
*.d.ts
declare function displayMessage(message: string)
Learn ReactJs, React Native from akashmittal.com