Skip to content

Commit

Permalink
Fix TypeScript error when verbatimModuleSyntax is enabled
Browse files Browse the repository at this point in the history
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.
```
  • Loading branch information
NilsMinten committed Jan 23, 2024
1 parent 2b88ce9 commit 7b37d1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/ts/router.test-d.ts
Original file line number Diff line number Diff line change
@@ -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>(Router.getInstance());
Expand Down

0 comments on commit 7b37d1d

Please # to comment.