diff --git a/.gitignore b/.gitignore index 629602e..da38761 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ node_modules/ coverage/ reports/ src/**/*.js +types/**/*.map # ignore log files *.log diff --git a/build/rollup.config.js b/build/rollup.config.js index 90250a8..937b55a 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -52,7 +52,7 @@ function baseConfig() { '@ionic/core/dist/ionic/svg', 'ionicons/dist/collection/icon/icon.css', ], - plugins: [vue(), typescript()], + plugins: [vue(), typescript({ useTsconfigDeclarationDir: true })], } } diff --git a/package.json b/package.json index e03bbe7..c9a89fe 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,13 @@ "license": "MIT", "repository": "github:ModusCreateOrg/ionic-vue", "main": "dist/ionic-vue.common.js", - "typings": "dist/index.d.ts", + "typings": "types/index.d.ts", "module": "dist/ionic-vue.esm.js", "unpkg": "dist/ionic-vue.js", "jsdelivr": "dist/ionic-vue.js", "files": [ "src/", + "types/", "dist/*.js", "dist/*.ts" ], diff --git a/src/api-utils.ts b/src/api-utils.ts index 8ef6431..888f037 100644 --- a/src/api-utils.ts +++ b/src/api-utils.ts @@ -1,4 +1,4 @@ -import { HTMLStencilElement } from './types/interfaces'; +import { HTMLStencilElement } from './interfaces'; // A proxy method that initializes the controller and calls requested method export function proxyMethod(tag: string, method: string, ...opts: any[]): Promise { diff --git a/src/api.ts b/src/api.ts index 85c551e..8aa2594 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,5 +1,5 @@ import Vue, { PluginFunction } from 'vue'; -import { ApiCache, FrameworkDelegate } from './types/interfaces'; +import { ApiCache, FrameworkDelegate } from './interfaces'; import Delegate from './framework-delegate'; import ProxyController from './proxy-controller'; import ProxyMenuController from './proxy-menu-controller'; @@ -13,37 +13,37 @@ export default class Api { static install: PluginFunction; // Create or return a ActionSheetController instance - get actionSheetController(): typeof ProxyController { + get actionSheetController(): ProxyController { return getOrCreateController('ion-action-sheet-controller'); } // Create or return an AlertController instance - get alertController(): typeof ProxyController { + get alertController(): ProxyController { return getOrCreateController('ion-alert-controller'); } // Create or return a LoadingController instance - get loadingController(): typeof ProxyController { + get loadingController(): ProxyController { return getOrCreateController('ion-loading-controller'); } // Create or return a MenuController instance - get menuController(): typeof ProxyMenuController { + get menuController(): ProxyMenuController { return getOrCreateMenuController('ion-menu-controller'); } // Create or return a ModalController instance - get modalController(): typeof ProxyDelegateController { + get modalController(): ProxyDelegateController { return getOrCreateDelegatedController('ion-modal-controller'); } // Create or return a PopoverController instance - get popoverController(): typeof ProxyDelegateController { + get popoverController(): ProxyDelegateController { return getOrCreateDelegatedController('ion-popover-controller'); } // Create or return a ToastController instance - get toastController(): typeof ProxyController { + get toastController(): ProxyController { return getOrCreateController('ion-toast-controller'); } } @@ -82,7 +82,7 @@ Api.install = (Vue): void => { }; // Get existing Base controller instance or initialize a new one -function getOrCreateController(tag: string): typeof ProxyController { +function getOrCreateController(tag: string): ProxyController { if (!Api.cache[tag]) { Api.cache[tag] = new ProxyController(tag); } @@ -91,7 +91,7 @@ function getOrCreateController(tag: string): typeof ProxyController { } // Get existing Menu controller instance or initialize a new one -function getOrCreateMenuController(tag: string): typeof ProxyMenuController { +function getOrCreateMenuController(tag: string): ProxyMenuController { if (!Api.cache[tag]) { Api.cache[tag] = new ProxyMenuController(tag); } @@ -100,7 +100,7 @@ function getOrCreateMenuController(tag: string): typeof ProxyMenuController { } // Get existing Delegated controller instance or initialize a new one -function getOrCreateDelegatedController(tag: string): typeof ProxyDelegateController { +function getOrCreateDelegatedController(tag: string): ProxyDelegateController { if (!Api.cache[tag]) { Api.cache[tag] = new ProxyDelegateController(tag, _Delegate); } diff --git a/src/components/ion-vue-router-transitionless.vue b/src/components/ion-vue-router-transitionless.vue index e3854b0..1695a63 100644 --- a/src/components/ion-vue-router-transitionless.vue +++ b/src/components/ion-vue-router-transitionless.vue @@ -7,7 +7,7 @@