Skip to content

Commit 32ed06f

Browse files
committed
chore: rename options
1 parent 7e8b6e3 commit 32ed06f

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ AutoImport({
329329
// Preserve the original file extensions in the generated .d.ts file.
330330
// Set to `true` to keep the extensions for .ts and .tsx files.
331331
// Default to false
332-
preserveExtsInDts: false,
332+
dtsPreserveExts: false,
333333

334334
// Array of strings of regexes that contains imports meant to be ignored during
335335
// the declaration file generation. You may find this useful when you need to provide

src/core/ctx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function createContext(options: Options = {}, root = process.cwd()) {
2222
const {
2323
dts: preferDTS = isPackageExists('typescript'),
2424
dtsMode = 'append',
25-
preserveExtsInDts = false,
25+
dtsPreserveExts = false,
2626
dirsScanOptions,
2727
dirs,
2828
vueDirectives,
@@ -141,7 +141,7 @@ ${dts}`.trim()}\n`
141141
resolvePath: (i) => {
142142
if (i.from.startsWith('.') || isAbsolute(i.from)) {
143143
const related = slash(
144-
preserveExtsInDts
144+
dtsPreserveExts
145145
? relative(dir, i.from)
146146
: relative(dir, i.from).replace(/\.ts(x)?$/, ''),
147147
)

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export interface Options {
173173
* Set to `true` to keep the extensions for .ts and .tsx files.
174174
* @default false
175175
*/
176-
preserveExtsInDts?: boolean
176+
dtsPreserveExts?: boolean
177177

178178
/**
179179
* Auto import inside Vue templates

0 commit comments

Comments
 (0)