From b764346c889d92a981814996fb8ca3307a9288bc Mon Sep 17 00:00:00 2001 From: Xymorot Date: Wed, 6 Jan 2021 14:53:10 +0100 Subject: [PATCH] meta: provide better type declaration for svelte modules --- .eslintrc.json | 1 + declarations/svelte.d.ts | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8098206..efc11ae 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -51,6 +51,7 @@ "**/*.{spec,mock}.*", "src/**/test/*", "src/renderer/**/*", + "declarations/**/*", "templates/**/*", "scripts/**/*" ] diff --git a/declarations/svelte.d.ts b/declarations/svelte.d.ts index 84338ad..038dbc9 100644 --- a/declarations/svelte.d.ts +++ b/declarations/svelte.d.ts @@ -1,7 +1,5 @@ declare module '*.svelte' { - class Component { - public constructor(options: { target: HTMLElement }); - } - - export = Component; + import { SvelteComponentTyped } from 'svelte'; + // noinspection JSUnusedGlobalSymbols -- because it is used + export class Component extends SvelteComponentTyped {} }