Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Nov 1, 2024
1 parent 43a297b commit 294ee81
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 19 deletions.
38 changes: 19 additions & 19 deletions fixtures/input/variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,22 +180,22 @@ export const methodDecoratorWithExplicitType = (
}
}

// TODO: Complex Constants with Type Inference
// export const CONFIG_MAP = {
// development: {
// features: {
// auth: {
// providers: ['google', 'github'] as const,
// settings: { timeout: 5000, retries: 3 }
// }
// }
// },
// production: {
// features: {
// auth: {
// providers: ['google', 'github', 'microsoft'] as const,
// settings: { timeout: 3000, retries: 5 }
// }
// }
// }
// } as const
// Complex Constants with Type Inference
export const CONFIG_MAP = {
development: {
features: {
auth: {
providers: ['google', 'github'] as const,
settings: { timeout: 5000, retries: 3 }
}
}
},
production: {
features: {
auth: {
providers: ['google', 'github', 'microsoft'] as const,
settings: { timeout: 3000, retries: 5 }
}
}
}
} as const
24 changes: 24 additions & 0 deletions fixtures/output/variable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,27 @@ export declare const complexObject: {
};
export declare const methodDecorator: (...args: any[]) => unknown;
export declare const methodDecoratorWithExplicitType: SomeType;
export declare const CONFIG_MAP: {
development: {
features: {
auth: {
providers: Array<'google' | 'github'] as cons>;
settings: {
timeout: 5000;
retries: 3
}
}
}
};
production: {
features: {
auth: {
providers: Array<'google' | 'github' | 'microsoft'] as cons>;
settings: {
timeout: 3000;
retries: 5
}
}
}
}
};

0 comments on commit 294ee81

Please sign in to comment.