If I define a typedef in one file, for example:
/**
* @typedef {{
* prop1: string,
* prop2: number
* }}
*/
myClass.typedef;
Can I share it across files? I don't want to have to declare the same typedef in every file.
I tried to do goog.provide('myClass.typedef');
in the file which defines it and goog.require('myClass.typedef');
in the other file which needs to use it. But I get an error "goog.require could not find myClass.typedef". I believe the provide/require is working in general as goog.provide('myClass');
and goog.require('myClass');
is working for the same two files.
What's the right way to do this?