diff --git a/package-lock.json b/package-lock.json index 0278e711..14ee155f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13696,9 +13696,9 @@ "dev": true }, "typescript": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz", - "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==", + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.2.tgz", + "integrity": "sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==", "dev": true }, "typical": { diff --git a/package.json b/package.json index 67cdc48b..e55dd25d 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "tachometer": "^0.4.16", "tslint": "^5.20.1", "typedoc": "^0.14.2", - "typescript": "^3.4.1", + "typescript": "^3.8.2", "uglify-es": "^3.3.9", "wct-mocha": "^1.0.0", "web-component-tester": "^6.9.2" diff --git a/src/test/lit-element_styling_test.ts b/src/test/lit-element_styling_test.ts index 10fdb3eb..686803a5 100644 --- a/src/test/lit-element_styling_test.ts +++ b/src/test/lit-element_styling_test.ts @@ -649,7 +649,7 @@ suite('Static get styles', () => { test('can extend and augment `styles`', async () => { const base = generateElementName(); - customElements.define(base, class extends LitElement { + class BaseClass extends LitElement { static get styles() { return css`div { border: 2px solid blue; @@ -660,10 +660,10 @@ suite('Static get styles', () => { return htmlWithStyles`
Testing1
`; } - }); - + } + customElements.define(base, BaseClass); const sub = generateElementName(); - customElements.define(sub, class extends customElements.get(base) { + customElements.define(sub, class extends BaseClass { static get styles() { return [ super.styles, @@ -671,7 +671,7 @@ suite('Static get styles', () => { display: block; border: 3px solid blue; }` - ]; + ] as any; } render() { @@ -682,7 +682,7 @@ suite('Static get styles', () => { }); const subsub = generateElementName(); - customElements.define(subsub, class extends customElements.get(sub) { + customElements.define(subsub, class extends BaseClass { static get styles() { return [ super.styles, @@ -690,7 +690,7 @@ suite('Static get styles', () => { display: block; border: 4px solid blue; }` - ]; + ] as any; } render() { @@ -719,7 +719,7 @@ suite('Static get styles', () => { test('can extend and override `styles`', async () => { const base = generateElementName(); - customElements.define(base, class extends LitElement { + class BaseClass extends LitElement { static get styles() { return css`div { border: 2px solid blue; @@ -730,10 +730,11 @@ suite('Static get styles', () => { return htmlWithStyles`
Testing1
`; } - }); + } + customElements.define(base, BaseClass); const sub = generateElementName(); - customElements.define(sub, class extends customElements.get(base) { + customElements.define(sub, class extends BaseClass { static get styles() { return css`div { border: 3px solid blue; @@ -742,7 +743,7 @@ suite('Static get styles', () => { }); const subsub = generateElementName(); - customElements.define(subsub, class extends customElements.get(sub) { + customElements.define(subsub, class extends BaseClass { static get styles() { return css`div { border: 4px solid blue; @@ -768,12 +769,13 @@ suite('Static get styles', () => { test('elements should inherit `styles` by default', async () => { const base = generateElementName(); - customElements.define(base, class extends LitElement { + class BaseClass extends LitElement { static styles = css`div {border: 4px solid black;}`; - }); + } + customElements.define(base, BaseClass); const sub = generateElementName(); - customElements.define(sub, class extends customElements.get(base) { + customElements.define(sub, class extends BaseClass { render() { return htmlWithStyles`
`; }