davemacaulay / types-magento2

TypeScript definitions for Magento 2
7 stars 0 forks source link

Request for additional library support #2

Open hryvinskyi opened 6 years ago

hryvinskyi commented 6 years ago

Very good work!!! will support: mage/smart-keyboard-handler mage/tabs mage/mage mage/ie-class-fixer of these libraries?

davemacaulay commented 6 years ago

Thank you! I'll happily add support for those libraries.

@scriptua could you provide examples of how you're using these components? mage/mage & mage/ie-class-fixer don't return anything so definitions would not benefit them. For mage/tabs this is generally initiated through mage-init. Interested to see how you're using them in your project.

hryvinskyi commented 6 years ago
import $ = require('jquery');
import keyboardHandler = require('mage/smart-keyboard-handler');
import tabs = require('mage/tabs');
import mage = require('mage/mage');
import ieClassFixer = require('mage/ie-class-fixer');
import domReady = require('domReady!');

module Test {
    export class Theme {
        constructor () {
            this.init();
        }

        public init() {
             keyboardHandler.apply();
             $('some-tag').tabs();
        }
    }
}