While reviewing typescript declaration files, I noticed that some people write declarations like this:
export function useTheme(): ITheme;
I thought that the declare
keyword was needed when declaring types for functions defined elsewhere. Is it valid to use
export declare function useTheme(): ITheme;
? If so, is there a reason to prefer one over the other?