You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Nolen edited this page Feb 10, 2017
·
3 revisions
The Problem
Currently externs inference is well suited for interop patterns that involve foreign JS instances, for example a function that takes a instance of React.Element. However, the feature is poorly suited for the popular singleton pattern employed by libraries like jQuery and D3 where all the interesting operations are provided through a single instance. In this case, the user will see many warnings about generated externs on Object but this is exactly what the user wants.
Proposed Solution
Support additional metadata to support the singleton pattern and suppress undesirable warnings.