From 7b37d1da886db37549277012a0203495e90efec3 Mon Sep 17 00:00:00 2001 From: Nils Minten Date: Tue, 23 Jan 2024 14:22:18 +0100 Subject: [PATCH] Fix TypeScript error when `verbatimModuleSyntax` is enabled When `verbatimModuleSyntax` is enabled in TypeScript when building your application two Type errors would pop up. ```console TS1484: 'RoutesMap' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled. ``` ```console TS1484: 'Route' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled. ``` --- Resources/ts/router.test-d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/ts/router.test-d.ts b/Resources/ts/router.test-d.ts index e9aadf7..862f183 100644 --- a/Resources/ts/router.test-d.ts +++ b/Resources/ts/router.test-d.ts @@ -1,6 +1,6 @@ import { expectType } from 'tsd'; -import { RoutesMap } from '../js/router'; -import { Route, Router, Routing } from './router'; +import type { RoutesMap } from '../js/router'; +import { Route, Router, type Routing } from './router'; import routes from './routes.json'; expectType(Router.getInstance());