Skip to content

Commit 5a93a7f

Browse files
committed
chore: wip
1 parent cb2e1d4 commit 5a93a7f

2 files changed

Lines changed: 81 additions & 7 deletions

File tree

fixtures/input/example-0001.ts

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,48 @@ export const someObject = {
1919
someBoolean: true,
2020
someFalse: false,
2121
someFunction: () => { console.log('hello world') },
22+
someFunction2: () => {
23+
// some comment
24+
/* some other comment */
25+
return some.object ?? 'default'
26+
},
2227
someArray: [1, 2, 3],
28+
someNestedArray: [
29+
[1, 2, 3],
30+
[4, 5, 6, 7, 8, 9, 10],
31+
],
32+
someComplexArray: [
33+
[
34+
{ key: 'value' },
35+
],
36+
[
37+
{ key2: 'value2' },
38+
'test',
39+
1000,
40+
],
41+
[
42+
'some string',
43+
console.log,
44+
someFunction(),
45+
]
46+
],
2347
someObject: { key: 'value' },
2448
someNestedObject: {
2549
key: {
2650
nestedKey: 'value',
51+
},
52+
otherKey: {
53+
nestedKey: process.cwd(),
54+
nestedKey2: () => { console.log('hello world') },
2755
}
2856
},
29-
someNestedArray: [
30-
[1, 2, 3],
31-
[4, 5, 6],
32-
],
3357
someNestedObjectArray: [
3458
{ key: 'value' },
35-
{ key: 'value' },
59+
{ key2: 'value2' },
3660
],
37-
someInlineCall: process.cwd(),
61+
someOtherObject: some.deep.object,
62+
someInlineCall2: console.log,
63+
someInlineCall3: console.log(),
3864
}
3965

4066
/**

fixtures/output/example-0001.d.ts

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,35 @@ export declare const someObject: {
1212
someNumber: 1000;
1313
someBoolean: true;
1414
someFalse: false;
15+
someFunction: Function;
16+
someFunction2: Function;
17+
someArray: [1, 2, 3];
18+
someNestedArray: [
19+
[1, 2, 3],
20+
[4, 5, 6, 7, 8, 9, 10]
21+
];
22+
someComplexArray: [
23+
[{ key: 'value' }],
24+
[{ key2: 'value2' }, 'test', 1000],
25+
['some string', Function, Function]
26+
];
27+
someObject: { key: 'value' };
28+
someNestedObject: {
29+
key: {
30+
nestedKey: 'value';
31+
};
32+
otherKey: {
33+
nestedKey: Function;
34+
nestedKey2: Function;
35+
};
36+
};
37+
someNestedObjectArray: [
38+
{ key: 'value' },
39+
{ key2: 'value2' }
40+
];
41+
someOtherObject: unknown;
42+
someInlineCall2: Function;
43+
someInlineCall3: Function;
1544
};
1645

1746
/**
@@ -92,7 +121,26 @@ declare interface Options<T> {
92121

93122
export declare function loadConfig<T extends Record<string, unknown>>(options: Options<T>): Promise<T>;
94123

95-
declare const dtsConfig: DtsGenerationConfig;
124+
declare const dtsConfig: {
125+
name: 'dts';
126+
cwd: process.cwd();
127+
defaultConfig: {
128+
root: './src';
129+
entrypoints: ['**/*.ts'];
130+
outdir: './dist',
131+
keepComments: true,
132+
clean: true,
133+
tsconfigPath: './tsconfig.json',
134+
},
135+
root: './src',
136+
entrypoints: ['**/*.ts'],
137+
outdir: './dist',
138+
keepComments: true,
139+
clean: true,
140+
tsconfigPath: './tsconfig.json',
141+
}
142+
143+
// declare const dtsConfig: DtsGenerationConfig;
96144

97145
export { generate, dtsConfig };
98146

0 commit comments

Comments
 (0)