Skip to content

Commit ad4ddec

Browse files
committed
fix(types): use declare const in d.ts
1 parent f92f491 commit ad4ddec

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

packages/varlet-cli/src/node/compiler/compileTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ declare module 'vue' {
6161
const template = `\
6262
import type { App } from 'vue'
6363
64-
export const version: string
65-
export const install: (app: App) => void
64+
export declare const version: string
65+
export declare const install: (app: App) => void
6666
6767
${exports.join('\n')}
6868
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { App } from 'vue'
22

3-
export const install: (app: App) => void
3+
export declare const install: (app: App) => void
44

55
export * from './basicComponent'
66
export * from './button'

packages/varlet-cli/template/generators/config/i18n/base/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { App } from 'vue'
22

3-
export const install: (app: App) => void
3+
export declare const install: (app: App) => void
44

55
export * from './basicComponent'
66
export * from './button'

packages/varlet-cli/template/generators/config/i18n/base/types/locale.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ interface Locale {
2323
}
2424
}
2525

26-
export const Locale: Locale
26+
export declare const Locale: Locale
2727

2828
export class _LocaleComponent {}

packages/varlet-ui/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { App } from 'vue'
22

3-
export const version: string
4-
export const install: (app: App) => void
3+
export declare const version: string
4+
export declare const install: (app: App) => void
55

66
export * from './actionSheet'
77
export * from './alert'

0 commit comments

Comments
 (0)