function test_sticky_static() { $.fn.sticky.settings.error!.method = 'method'; $.fn.sticky.settings.namespace = 'namespace'; $.fn.sticky.settings.name = 'name'; $.fn.sticky.settings.silent = false; $.fn.sticky.settings.debug = true; $.fn.sticky.settings.performance = true; $.fn.sticky.settings.verbose = true; } function test_sticky() { const selector = '.ui.sticky'; $(selector).sticky('refresh'); // $ExpectType JQuery $(selector).sticky('destroy'); // $ExpectType JQuery $(selector).sticky('setting', 'debug', undefined); // $ExpectType boolean $(selector).sticky('setting', 'debug'); // $ExpectType boolean $(selector).sticky('setting', 'debug', true); // $ExpectType JQuery // $ExpectType JQuery $(selector).sticky('setting', { namespace: 'namespace', name: 'name', silent: false, debug: true, performance: true, verbose: true }); // $ExpectType JQuery $(selector).sticky({ pushing: false, setSize: false, jitter: 4, observeChanges: true, context: $(), scrollContext: $(), offset: 1, bottomOffset: 200, onReposition() { this; // $ExpectType JQuery }, onScroll() { this; // $ExpectType JQuery }, onStick() { this; // $ExpectType JQuery }, onUnstick() { this; // $ExpectType JQuery }, onTop() { this; // $ExpectType JQuery }, onBottom() { this; // $ExpectType JQuery }, className: { bound: 'bound', fixed: 'fixed', supported: 'supported', top: 'top', bottom: 'bottom' }, error: { container: 'container', visible: 'visible', method: 'method', invalidContext: 'invalidContext', elementSize: 'elementSize' } }); $(selector).sticky(); // $ExpectType JQuery $(selector).sticky('foo'); // $ExpectError $(selector).sticky({ foo: 'bar' }); // $ExpectError } import sticky = require('semantic-ui-sticky'); function test_module() { sticky; // $ExpectType Sticky $.fn.sticky = sticky; }