Skip to content

Commit 0cd2100

Browse files
committed
fix(trpc): make sure "import type" is used for type-only imports
1 parent 5806a4d commit 0cd2100

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

packages/plugins/trpc/src/generator.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,21 @@ function createAppRouter(
9999
{
100100
namedImports: [
101101
'unsetMarker',
102-
'type AnyRouter',
103-
'type AnyRootConfig',
104-
'type CreateRouterInner',
105-
'type Procedure',
106-
'type ProcedureBuilder',
107-
'type ProcedureParams',
108-
'type ProcedureRouterRecord',
109-
'type ProcedureType',
102+
'AnyRouter',
103+
'AnyRootConfig',
104+
'CreateRouterInner',
105+
'Procedure',
106+
'ProcedureBuilder',
107+
'ProcedureParams',
108+
'ProcedureRouterRecord',
109+
'ProcedureType',
110110
],
111+
isTypeOnly: true,
111112
moduleSpecifier: '@trpc/server',
112113
},
113114
{
114-
namedImports: ['type PrismaClient'],
115+
namedImports: ['PrismaClient'],
116+
isTypeOnly: true,
115117
moduleSpecifier: prismaImport,
116118
},
117119
]);

0 commit comments

Comments
 (0)