@@ -22,23 +22,27 @@ test('redirect.dts default', async () => {
2222 import type { LoggerOptions } from './types';
2323 import { defaultOptions } from './types.js';
2424 export { logRequest, logger, type LoggerOptions, defaultOptions };
25- export type { Foo } from './logger';
25+ export type { Foo } from './types';
26+ export type { Bar } from './types';
2627 export * from './types';
2728 export * from '../../../compile/rslog';
2829 export * from './logger';
2930 ",
3031 "<ROOT>/tests/integration/redirect/dts/dist/default/esm/logger.d.ts": "import type { Request } from 'express';
3132 import type { LoggerOptions } from './types';
3233 export declare function logRequest(req: Request, options: LoggerOptions): void;
33- export interface Foo {
34- bar: string;
35- }
3634 ",
3735 "<ROOT>/tests/integration/redirect/dts/dist/default/esm/types.d.ts": "export interface LoggerOptions {
3836 logLevel: 'info' | 'debug' | 'warn' | 'error';
3937 logBody: boolean;
4038 }
4139 export declare const defaultOptions: LoggerOptions;
40+ export interface Foo {
41+ foo: string;
42+ }
43+ export interface Bar {
44+ bar: string;
45+ }
4246 ",
4347 }
4448 ` ) ;
@@ -57,23 +61,27 @@ test('redirect.dts.path false', async () => {
5761 import type { LoggerOptions } from './types';
5862 import { defaultOptions } from './types.js';
5963 export { logRequest, logger, type LoggerOptions, defaultOptions };
60- export type { Foo } from '@src/logger';
64+ export type { Foo } from '@src/types';
65+ export type { Bar } from 'types';
6166 export * from './types';
6267 export * from 'rslog';
6368 export * from '@src/logger';
6469 ",
6570 "<ROOT>/tests/integration/redirect/dts/dist/path-false/esm/logger.d.ts": "import type { Request } from 'express';
6671 import type { LoggerOptions } from './types';
6772 export declare function logRequest(req: Request, options: LoggerOptions): void;
68- export interface Foo {
69- bar: string;
70- }
7173 ",
7274 "<ROOT>/tests/integration/redirect/dts/dist/path-false/esm/types.d.ts": "export interface LoggerOptions {
7375 logLevel: 'info' | 'debug' | 'warn' | 'error';
7476 logBody: boolean;
7577 }
7678 export declare const defaultOptions: LoggerOptions;
79+ export interface Foo {
80+ foo: string;
81+ }
82+ export interface Bar {
83+ bar: string;
84+ }
7785 ",
7886 }
7987 ` ) ;
@@ -92,23 +100,27 @@ test('redirect.dts.extension true', async () => {
92100 import type { LoggerOptions } from './types.js';
93101 import { defaultOptions } from './types.js';
94102 export { logRequest, logger, type LoggerOptions, defaultOptions };
95- export type { Foo } from './logger.js';
103+ export type { Foo } from './types.js';
104+ export type { Bar } from './types.js';
96105 export * from './types.js';
97106 export * from '../../../compile/rslog';
98107 export * from './logger.js';
99108 ",
100109 "<ROOT>/tests/integration/redirect/dts/dist/extension-true/esm/logger.d.ts": "import type { Request } from 'express';
101110 import type { LoggerOptions } from './types.js';
102111 export declare function logRequest(req: Request, options: LoggerOptions): void;
103- export interface Foo {
104- bar: string;
105- }
106112 ",
107113 "<ROOT>/tests/integration/redirect/dts/dist/extension-true/esm/types.d.ts": "export interface LoggerOptions {
108114 logLevel: 'info' | 'debug' | 'warn' | 'error';
109115 logBody: boolean;
110116 }
111117 export declare const defaultOptions: LoggerOptions;
118+ export interface Foo {
119+ foo: string;
120+ }
121+ export interface Bar {
122+ bar: string;
123+ }
112124 ",
113125 }
114126 ` ) ;
@@ -127,23 +139,27 @@ test('redirect.dts.extension true with dts.autoExtension true', async () => {
127139 import type { LoggerOptions } from './types.mjs';
128140 import { defaultOptions } from './types.mjs';
129141 export { logRequest, logger, type LoggerOptions, defaultOptions };
130- export type { Foo } from './logger.mjs';
142+ export type { Foo } from './types.mjs';
143+ export type { Bar } from './types.mjs';
131144 export * from './types.mjs';
132145 export * from '../../../compile/rslog';
133146 export * from './logger.mjs';
134147 ",
135148 "<ROOT>/tests/integration/redirect/dts/dist/auto-extension-true/esm/logger.d.mts": "import type { Request } from 'express';
136149 import type { LoggerOptions } from './types.mjs';
137150 export declare function logRequest(req: Request, options: LoggerOptions): void;
138- export interface Foo {
139- bar: string;
140- }
141151 ",
142152 "<ROOT>/tests/integration/redirect/dts/dist/auto-extension-true/esm/types.d.mts": "export interface LoggerOptions {
143153 logLevel: 'info' | 'debug' | 'warn' | 'error';
144154 logBody: boolean;
145155 }
146156 export declare const defaultOptions: LoggerOptions;
157+ export interface Foo {
158+ foo: string;
159+ }
160+ export interface Bar {
161+ bar: string;
162+ }
147163 ",
148164 }
149165 ` ) ;
0 commit comments