Skip to content

Commit

Permalink
fix(typescript): re-enables typescript for component package tests
Browse files Browse the repository at this point in the history
* This reverts commit fc5e7a9.
* fixes regressed typescript type in testing-ground
  • Loading branch information
diehbria authored and sheilaXu committed Mar 11, 2023
1 parent 634959c commit 9b1ef48
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 14 deletions.
52 changes: 52 additions & 0 deletions packages/components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export namespace Components {
"widgetId": string;
"wrapLines": boolean;
}
interface IotResourceExplorerDemo {
}
interface IotScatterChart {
"alarms"?: AlarmsConfig;
"annotations": Annotations;
Expand Down Expand Up @@ -144,6 +146,8 @@ export namespace Components {
"viewport": Viewport;
"widgetId": string;
}
interface IotTestRoutes {
}
interface IotTimeSeriesConnector {
"annotations": Annotations;
"assignDefaultColors": boolean | undefined;
Expand Down Expand Up @@ -171,9 +175,13 @@ export namespace Components {
"sortingDisabled": boolean;
"wrapLines": boolean;
}
interface IotTreeTableDemo {
}
interface IotWebglContext {
"viewFrame": HTMLElement | Window | undefined;
}
interface TestingGroundAppKit {
}
}
declare global {
interface HTMLIotBarChartElement extends Components.IotBarChart, HTMLStencilElement {
Expand Down Expand Up @@ -206,6 +214,12 @@ declare global {
prototype: HTMLIotResourceExplorerElement;
new (): HTMLIotResourceExplorerElement;
};
interface HTMLIotResourceExplorerDemoElement extends Components.IotResourceExplorerDemo, HTMLStencilElement {
}
var HTMLIotResourceExplorerDemoElement: {
prototype: HTMLIotResourceExplorerDemoElement;
new (): HTMLIotResourceExplorerDemoElement;
};
interface HTMLIotScatterChartElement extends Components.IotScatterChart, HTMLStencilElement {
}
var HTMLIotScatterChartElement: {
Expand All @@ -230,6 +244,12 @@ declare global {
prototype: HTMLIotTableElement;
new (): HTMLIotTableElement;
};
interface HTMLIotTestRoutesElement extends Components.IotTestRoutes, HTMLStencilElement {
}
var HTMLIotTestRoutesElement: {
prototype: HTMLIotTestRoutesElement;
new (): HTMLIotTestRoutesElement;
};
interface HTMLIotTimeSeriesConnectorElement extends Components.IotTimeSeriesConnector, HTMLStencilElement {
}
var HTMLIotTimeSeriesConnectorElement: {
Expand All @@ -242,25 +262,41 @@ declare global {
prototype: HTMLIotTreeTableElement;
new (): HTMLIotTreeTableElement;
};
interface HTMLIotTreeTableDemoElement extends Components.IotTreeTableDemo, HTMLStencilElement {
}
var HTMLIotTreeTableDemoElement: {
prototype: HTMLIotTreeTableDemoElement;
new (): HTMLIotTreeTableDemoElement;
};
interface HTMLIotWebglContextElement extends Components.IotWebglContext, HTMLStencilElement {
}
var HTMLIotWebglContextElement: {
prototype: HTMLIotWebglContextElement;
new (): HTMLIotWebglContextElement;
};
interface HTMLTestingGroundAppKitElement extends Components.TestingGroundAppKit, HTMLStencilElement {
}
var HTMLTestingGroundAppKitElement: {
prototype: HTMLTestingGroundAppKitElement;
new (): HTMLTestingGroundAppKitElement;
};
interface HTMLElementTagNameMap {
"iot-bar-chart": HTMLIotBarChartElement;
"iot-kpi": HTMLIotKpiElement;
"iot-line-chart": HTMLIotLineChartElement;
"iot-react-table": HTMLIotReactTableElement;
"iot-resource-explorer": HTMLIotResourceExplorerElement;
"iot-resource-explorer-demo": HTMLIotResourceExplorerDemoElement;
"iot-scatter-chart": HTMLIotScatterChartElement;
"iot-status-grid": HTMLIotStatusGridElement;
"iot-status-timeline": HTMLIotStatusTimelineElement;
"iot-table": HTMLIotTableElement;
"iot-test-routes": HTMLIotTestRoutesElement;
"iot-time-series-connector": HTMLIotTimeSeriesConnectorElement;
"iot-tree-table": HTMLIotTreeTableElement;
"iot-tree-table-demo": HTMLIotTreeTableDemoElement;
"iot-webgl-context": HTMLIotWebglContextElement;
"testing-ground-app-kit": HTMLTestingGroundAppKitElement;
}
}
declare namespace LocalJSX {
Expand Down Expand Up @@ -333,6 +369,8 @@ declare namespace LocalJSX {
"widgetId"?: string;
"wrapLines"?: boolean;
}
interface IotResourceExplorerDemo {
}
interface IotScatterChart {
"alarms"?: AlarmsConfig;
"annotations"?: Annotations;
Expand Down Expand Up @@ -394,6 +432,8 @@ declare namespace LocalJSX {
"viewport": Viewport;
"widgetId"?: string;
}
interface IotTestRoutes {
}
interface IotTimeSeriesConnector {
"annotations"?: Annotations;
"assignDefaultColors"?: boolean | undefined;
Expand Down Expand Up @@ -421,22 +461,30 @@ declare namespace LocalJSX {
"sortingDisabled"?: boolean;
"wrapLines"?: boolean;
}
interface IotTreeTableDemo {
}
interface IotWebglContext {
"viewFrame"?: HTMLElement | Window | undefined;
}
interface TestingGroundAppKit {
}
interface IntrinsicElements {
"iot-bar-chart": IotBarChart;
"iot-kpi": IotKpi;
"iot-line-chart": IotLineChart;
"iot-react-table": IotReactTable;
"iot-resource-explorer": IotResourceExplorer;
"iot-resource-explorer-demo": IotResourceExplorerDemo;
"iot-scatter-chart": IotScatterChart;
"iot-status-grid": IotStatusGrid;
"iot-status-timeline": IotStatusTimeline;
"iot-table": IotTable;
"iot-test-routes": IotTestRoutes;
"iot-time-series-connector": IotTimeSeriesConnector;
"iot-tree-table": IotTreeTable;
"iot-tree-table-demo": IotTreeTableDemo;
"iot-webgl-context": IotWebglContext;
"testing-ground-app-kit": TestingGroundAppKit;
}
}
export { LocalJSX as JSX };
Expand All @@ -448,13 +496,17 @@ declare module "@stencil/core" {
"iot-line-chart": LocalJSX.IotLineChart & JSXBase.HTMLAttributes<HTMLIotLineChartElement>;
"iot-react-table": LocalJSX.IotReactTable & JSXBase.HTMLAttributes<HTMLIotReactTableElement>;
"iot-resource-explorer": LocalJSX.IotResourceExplorer & JSXBase.HTMLAttributes<HTMLIotResourceExplorerElement>;
"iot-resource-explorer-demo": LocalJSX.IotResourceExplorerDemo & JSXBase.HTMLAttributes<HTMLIotResourceExplorerDemoElement>;
"iot-scatter-chart": LocalJSX.IotScatterChart & JSXBase.HTMLAttributes<HTMLIotScatterChartElement>;
"iot-status-grid": LocalJSX.IotStatusGrid & JSXBase.HTMLAttributes<HTMLIotStatusGridElement>;
"iot-status-timeline": LocalJSX.IotStatusTimeline & JSXBase.HTMLAttributes<HTMLIotStatusTimelineElement>;
"iot-table": LocalJSX.IotTable & JSXBase.HTMLAttributes<HTMLIotTableElement>;
"iot-test-routes": LocalJSX.IotTestRoutes & JSXBase.HTMLAttributes<HTMLIotTestRoutesElement>;
"iot-time-series-connector": LocalJSX.IotTimeSeriesConnector & JSXBase.HTMLAttributes<HTMLIotTimeSeriesConnectorElement>;
"iot-tree-table": LocalJSX.IotTreeTable & JSXBase.HTMLAttributes<HTMLIotTreeTableElement>;
"iot-tree-table-demo": LocalJSX.IotTreeTableDemo & JSXBase.HTMLAttributes<HTMLIotTreeTableDemoElement>;
"iot-webgl-context": LocalJSX.IotWebglContext & JSXBase.HTMLAttributes<HTMLIotWebglContextElement>;
"testing-ground-app-kit": LocalJSX.TestingGroundAppKit & JSXBase.HTMLAttributes<HTMLTestingGroundAppKitElement>;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class TestingGround {
const { query } = initialize({
awsCredentials: getEnvCredentials(),
awsRegion: 'us-west-2',
settings: { batchDuration: undefined, legacyAPI: false },
settings: { batchDuration: undefined },
});
this.query = query;
}
Expand Down
16 changes: 3 additions & 13 deletions packages/components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"allowUnreachableCode": false,
"declaration": false,
"experimentalDecorators": true,
"lib": [
"dom",
"es2019"
],
"lib": ["dom", "es2019"],
"moduleResolution": "node",
"module": "esnext",
"target": "es2017",
Expand All @@ -20,13 +17,6 @@
"skipLibCheck": true,
"resolveJsonModule": true
},
"include": [
"src",
"types/jsx.d.ts",
"cypress"
],
"exclude": [
"node_modules",
"src/testing"
]
"include": ["src", "types/jsx.d.ts", "cypress"],
"exclude": ["node_modules"]
}

0 comments on commit 9b1ef48

Please sign in to comment.