I know I can get all shared text styles by
var sketch = require("sketch");
var document = sketch.getSelectedDocument();
var sharedStyles = document.sharedTextStyles;
But the results will return local (in document) text styles as well as any used from a library. How can I get only the shared text styles that are defined in the document. I don't see any property or data within the result of document.sharedTextStyles that shows whether that style is local or from a library. What am I missing?