'What is the scope of a type alias?

What is the scope of a typescript type alias? I have this alias and I think that I might want to declare it globally somehow:

type ResouceResult<T> = T & {
    $promise: ng.IPromise<T>,
    $resolved: boolean
};


Solution 1:[1]

declare it globally

If your file is a global, the type alias is global. If its a module, the type alias is a module.

More on this: https://basarat.gitbook.io/typescript/project/modules

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1