Skip to content

Commit 586cc6a

Browse files
committed
chore: highlighting of ts text
1 parent f649313 commit 586cc6a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/codegen/generateDTS.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// for highlighting
2-
const ts = String.raw
1+
import { ts } from '../utils'
32

43
export function generateDTS({
54
routesModule,

src/codegen/vueRouterModule.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// NOTE: this code needs to be generated because otherwise it doesn't go through transforms and `vue-router/auto-routes`
22

3+
import { ts } from '../utils'
34
import type { ResolvedOptions } from '../options'
45

56
// cannot be resolved.
@@ -8,7 +9,7 @@ export function generateVueRouterProxy(
89
_options: ResolvedOptions,
910
{ addPiniaColada }: { addPiniaColada: boolean }
1011
) {
11-
return `
12+
return ts`
1213
import { createRouter as _createRouter } from 'vue-router'
1314
1415
export * from 'vue-router'

src/utils/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ export type _Awaitable<T> = T | PromiseLike<T>
1111
export type LiteralStringUnion<LiteralType, BaseType extends string = string> =
1212
| LiteralType
1313
| (BaseType & Record<never, never>)
14+
//
15+
// for highlighting
16+
export const ts = String.raw

0 commit comments

Comments
 (0)