Skip to content

Commit 294ee81

Browse files
committed
chore: wip
1 parent 43a297b commit 294ee81

File tree

2 files changed

+43
-19
lines changed

2 files changed

+43
-19
lines changed

fixtures/input/variable.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,22 @@ export const methodDecoratorWithExplicitType = (
180180
}
181181
}
182182

183-
// TODO: Complex Constants with Type Inference
184-
// export const CONFIG_MAP = {
185-
// development: {
186-
// features: {
187-
// auth: {
188-
// providers: ['google', 'github'] as const,
189-
// settings: { timeout: 5000, retries: 3 }
190-
// }
191-
// }
192-
// },
193-
// production: {
194-
// features: {
195-
// auth: {
196-
// providers: ['google', 'github', 'microsoft'] as const,
197-
// settings: { timeout: 3000, retries: 5 }
198-
// }
199-
// }
200-
// }
201-
// } as const
183+
// Complex Constants with Type Inference
184+
export const CONFIG_MAP = {
185+
development: {
186+
features: {
187+
auth: {
188+
providers: ['google', 'github'] as const,
189+
settings: { timeout: 5000, retries: 3 }
190+
}
191+
}
192+
},
193+
production: {
194+
features: {
195+
auth: {
196+
providers: ['google', 'github', 'microsoft'] as const,
197+
settings: { timeout: 3000, retries: 5 }
198+
}
199+
}
200+
}
201+
} as const

fixtures/output/variable.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,27 @@ export declare const complexObject: {
101101
};
102102
export declare const methodDecorator: (...args: any[]) => unknown;
103103
export declare const methodDecoratorWithExplicitType: SomeType;
104+
export declare const CONFIG_MAP: {
105+
development: {
106+
features: {
107+
auth: {
108+
providers: Array<'google' | 'github'] as cons>;
109+
settings: {
110+
timeout: 5000;
111+
retries: 3
112+
}
113+
}
114+
}
115+
};
116+
production: {
117+
features: {
118+
auth: {
119+
providers: Array<'google' | 'github' | 'microsoft'] as cons>;
120+
settings: {
121+
timeout: 3000;
122+
retries: 5
123+
}
124+
}
125+
}
126+
}
127+
};

0 commit comments

Comments
 (0)