diff --git a/core/package.json b/core/package.json index 8e004259ade..a0945e730c8 100644 --- a/core/package.json +++ b/core/package.json @@ -34,7 +34,7 @@ "tslib": "^1.10.0" }, "devDependencies": { - "@stencil/core": "1.3.2", + "@stencil/core": "1.4.0", "@stencil/sass": "1.0.1", "@types/jest": "24.0.17", "@types/node": "12.7.1", diff --git a/core/src/utils/watch-options.ts b/core/src/utils/watch-options.ts index e40094fafe8..96acaae3c66 100644 --- a/core/src/utils/watch-options.ts +++ b/core/src/utils/watch-options.ts @@ -9,22 +9,22 @@ export const watchForOptions = (containerEl: HTMLElement, return mutation; }; -const getSelectedOption = (mutationList: MutationRecord[], tagName: string) => { - let newOption: T | undefined; +const getSelectedOption = (mutationList: MutationRecord[], tagName: string): T | undefined => { + let newOption: HTMLElement | undefined; mutationList.forEach(mut => { // tslint:disable-next-line: prefer-for-of for (let i = 0; i < mut.addedNodes.length; i++) { newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption; } }); - return newOption; + return newOption as any; }; export const findCheckedOption = (el: any, tagName: string) => { if (el.nodeType !== 1) { return undefined; } - const options = (el.tagName === tagName.toUpperCase()) + const options: HTMLElement[] = (el.tagName === tagName.toUpperCase()) ? [el] : Array.from(el.querySelectorAll(tagName)); diff --git a/core/stencil.config.ts b/core/stencil.config.ts index d926aa87fac..39425c6f069 100644 --- a/core/stencil.config.ts +++ b/core/stencil.config.ts @@ -69,6 +69,11 @@ export const config: Config = { }) ], outputTargets: [ + { + type: 'docs-vscode', + file: 'dist/html.html-data.json', + sourceCodeBaseUrl: 'https://github.com/ionic-team/ionic/tree/master/core/', + }, { type: 'dist', esmLoaderPath: '../loader',