.d.ts
) we provide.
Integrating the TitanSDK types
Here is a suggestion on how to integrate our type declarations into your project. 1. Download the .d.ts File First, get the declaration file and save it locally. You can do this by opening the CDN URL in your browser and saving the content or by using a command-line tool like curl. Note: The interface should not change, but sometimes we might add new properties to the SDK. The declaration file (d.ts
) is updated automatically once we add something new to the interface.
Example URL: https://sdk.titanos.tv/sdk/sdk.d.ts
Recommended Location: Create a new folder, src/types, and save the file there. This keeps your project organized and separate from your main code.
Your project structure should look like this after this step:
window.TitanSDK
directly in your TypeScript or JavaScript files. Your code editor will now provide IntelliSense, autocompletion, and type-checking for all the functions and properties defined in the .d.ts file.
You no longer need to import the types or variables; TypeScript automatically links them based on their names.
TypeScript in action in a React Component:

Real-World Examples & Resources
To see these it in action and understand more about the integration on our GitHub examples repository:- Example: Using Typescrip: A simple carousel with TTS using React + Vite + Typescript.