@@ -37,9 +37,9 @@ function parentDir(p) {
37
37
return path . dirname ( p ) || path . sep ;
38
38
}
39
39
40
- /** @type {import('./index.d.ts ').LoaderSync } */
40
+ /** @type {import('./index').LoaderSync } */
41
41
const jsonLoader = ( _ , content ) => JSON . parse ( content ) ;
42
- /** @type {import('./index.d.ts ').LoadersSync } */
42
+ /** @type {import('./index').LoadersSync } */
43
43
const defaultLoadersSync = Object . freeze ( {
44
44
'.js' : require ,
45
45
'.json' : require ,
@@ -48,7 +48,7 @@ const defaultLoadersSync = Object.freeze({
48
48
} ) ;
49
49
module . exports . defaultLoadersSync = defaultLoadersSync ;
50
50
51
- /** @type {import('./index.d.ts ').Loader } */
51
+ /** @type {import('./index').Loader } */
52
52
const dynamicImport = async id => {
53
53
try {
54
54
const mod = await import ( id ) ;
@@ -74,7 +74,7 @@ const dynamicImport = async id => {
74
74
}
75
75
} ;
76
76
77
- /** @type {import('./index.d.ts ').Loaders } */
77
+ /** @type {import('./index').Loaders } */
78
78
const defaultLoaders = Object . freeze ( {
79
79
'.js' : dynamicImport ,
80
80
'.mjs' : dynamicImport ,
@@ -86,12 +86,12 @@ module.exports.defaultLoaders = defaultLoaders;
86
86
87
87
/**
88
88
* @param {string } name
89
- * @param {import('./index.d.ts ').Options | import('./index.d.ts ').OptionsSync } options
89
+ * @param {import('./index').Options | import('./index').OptionsSync } options
90
90
* @param {boolean } sync
91
- * @returns {Required<import('./index.d.ts ').Options | import('./index.d.ts ').OptionsSync> }
91
+ * @returns {Required<import('./index').Options | import('./index').OptionsSync> }
92
92
*/
93
93
function getOptions ( name , options , sync ) {
94
- /** @type {Required<import('./index.d.ts ').Options> } */
94
+ /** @type {Required<import('./index').Options> } */
95
95
const conf = {
96
96
stopDir : os . homedir ( ) ,
97
97
searchPlaces : getDefaultSearchPlaces ( name , sync ) ,
@@ -138,7 +138,7 @@ function validateFilePath(filepath) {
138
138
if ( ! filepath ) throw new Error ( 'load must pass a non-empty string' ) ;
139
139
}
140
140
141
- /** @type {(loader: import('./index.d.ts ').Loader, ext: string) => void } */
141
+ /** @type {(loader: import('./index').Loader, ext: string) => void } */
142
142
function validateLoader ( loader , ext ) {
143
143
if ( ! loader ) throw new Error ( `No loader specified for extension "${ ext } "` ) ;
144
144
if ( typeof loader !== 'function' )
@@ -151,7 +151,7 @@ const makeEmplace = enableCache => (c, filepath, res) => {
151
151
return res ;
152
152
} ;
153
153
154
- /** @type {import('./index.d.ts ').lilconfig } */
154
+ /** @type {import('./index').lilconfig } */
155
155
module . exports . lilconfig = function lilconfig ( name , options ) {
156
156
const {
157
157
ignoreEmptySearchPlaces,
@@ -168,7 +168,7 @@ module.exports.lilconfig = function lilconfig(name, options) {
168
168
169
169
return {
170
170
async search ( searchFrom = process . cwd ( ) ) {
171
- /** @type {import('./index.d.ts ').LilconfigResult } */
171
+ /** @type {import('./index').LilconfigResult } */
172
172
const result = {
173
173
config : null ,
174
174
filepath : '' ,
@@ -264,7 +264,7 @@ module.exports.lilconfig = function lilconfig(name, options) {
264
264
} ) ,
265
265
) ;
266
266
}
267
- /** @type {import('./index.d.ts ').LilconfigResult } */
267
+ /** @type {import('./index').LilconfigResult } */
268
268
const result = {
269
269
config : null ,
270
270
filepath : absPath ,
@@ -310,7 +310,7 @@ module.exports.lilconfig = function lilconfig(name, options) {
310
310
} ;
311
311
} ;
312
312
313
- /** @type {import('./index.d.ts ').lilconfigSync } */
313
+ /** @type {import('./index').lilconfigSync } */
314
314
module . exports . lilconfigSync = function lilconfigSync ( name , options ) {
315
315
const {
316
316
ignoreEmptySearchPlaces,
@@ -327,7 +327,7 @@ module.exports.lilconfigSync = function lilconfigSync(name, options) {
327
327
328
328
return {
329
329
search ( searchFrom = process . cwd ( ) ) {
330
- /** @type {import('./index.d.ts ').LilconfigResult } */
330
+ /** @type {import('./index').LilconfigResult } */
331
331
const result = {
332
332
config : null ,
333
333
filepath : '' ,
0 commit comments